Opened 3 years ago

Closed 3 years ago

#79 closed defect (fixed)

Preview not cleared while drawing center+radius circles/ellipses

Reported by: Philip Linde Owned by: pulkomandy
Priority: minor Milestone: 2.6
Component: GrafX2 Version: 2.5
Keywords: Cc:

Description

When you draw centered circles and ellipses, the preview is not always cleared and updated correctly, leaving traces of the last circle on the screen or not completely drawing the preview circle. Once the operation is complete, it is all cleared and updated correctly.

Change History (5)

comment:1 Changed 3 years ago by Philip Linde

I think I have a good idea of what's going on here, at least for circles. Circle_12_5 calculates a radius and uses that for partially clearing the preview data and partially updating the screen, but it does so based only on the current radius, so if the current radius is smaller than the previous radius you end up only updating and displaying part of the previous circle.

One solution might be to add an additional value to the stack that always contains the previous radius and use that for clearing. I will attempt this tonight.

comment:2 Changed 3 years ago by Philip Linde

I was wrong, the circle routines correctly calculates the right radius. The problem is in the Update_part_of_screen routine, specifically in the attribute clash quantization.

comment:3 Changed 3 years ago by PulkoMandy

I was aware of problems with the attribute clash system, but it is not supposed to be enabled at all unless you are using the ZX spectrum or Thomson FX?

comment:4 Changed 3 years ago by Philip Linde

Hmm, the quantization code isn't conditional so it always applies. Maybe the idea was that it can't hurt having it (except some small additional performance cost) as long as it works correctly and fully encloses the unquantized area. It's also clamped so that the updates never exceed the visible area.

I have submitted merge request !69 which solves the quantization problem for updates anyway, but maybe someone should have a look at completely disabling it unless the ZX/Thompson modes are used.

comment:5 Changed 3 years ago by PulkoMandy

Resolution: fixed
Status: newclosed

Merged changes in b6cebc4e. Thanks!

Note: See TracTickets for help on using tickets.