plot/scroll fixes#99
Conversation
| case 1: { | ||
| // use fg colour | ||
| canvas->setPenColor(gfg); | ||
| canvas->setBrushColor(gfg); |
There was a problem hiding this comment.
these setBrushColor calls are unnecessary - they're a "fill colour" thing for filled shapes, but for filled shapes we call the setGraphicsFill function (that's just below this one)
when these calls are here, a canvas->scroll call will end up filling columns - removing them makes the scrolling stars demo work properly (well, once that demo has been fixed with a corrected PLOT call and appropriate MODE to work properly with latest VDP 😁)
| auto size = 2 * sqrt(rp1.X * rp1.X + rp1.Y * rp1.Y); | ||
| if (filled) { | ||
| canvas->fillEllipse(p2.X, p2.Y, size, size); | ||
| canvas->fillEllipse(p2.X, p2.Y, size, rectangularPixels ? size / 2 : size); |
There was a problem hiding this comment.
I'd noticed that the random circles demo (circles_2.bas) would draw elongated circles when in 640x240 resolution screen modes. thinking this thru, it's because fab-gl doesn't draw circles, it draws squished circles (ellipses). this code wasn't caring about pixel shape, and was assuming all pixels are square
our rectangular pixel modes are all 2x1, so this fixes their shape
fixes issue with “scroll” caused by fill colour being set when it wasn’t needed to be fixes circle for rectangular pixel modes
3d323f6 to
f1a484f
Compare
fixes issue with “scroll” caused by fill colour being set when it wasn’t needed to be
fixes circle for rectangular pixel modes (they were being drawn double-height)