[haiku-bugs] [Haiku] #10007: OP_INVERT and anti-aliasing don't play together

  • From: "Pete" <trac@xxxxxxxxxxxx>
  • Date: Sun, 22 Sep 2013 22:20:59 -0000

#10007: OP_INVERT and anti-aliasing don't play together
--------------------------------+---------------------------
 Reporter:  Pete                |        Owner:  axeld
     Type:  bug                 |       Status:  new
 Priority:  normal              |    Milestone:  R1
Component:  Kits/Interface Kit  |      Version:  R1/alpha4.1
 Keywords:                      |   Blocked By:
 Blocking:                      |  Has a Patch:  0
 Platform:  All                 |
--------------------------------+---------------------------
 This is a long-standing glitch that I think ought to be looked into. I
 worked around it in my own software, but I see it shows up in e.g.
 ArtPaint, too.

 In BeOS, the common and convenient way to draw 'rubber-band' lines,
 temporary outlines, and so on, was to draw with OP_INVERT: draw once and
 it it visible, draw again and it is erased.  With everything being drawn
 anti-aliased, this no longer works.  Things don't get erased properly, and
 garbage is left strewn everywhere.

 When I found this happening in MusicWeaver, I wrote my own short Bresenham
 code to explicitly draw with single points (actually
 "InvertRect(BRect(x,y,x,y));") but it would be nicer to be able to use the
 kit's methods to draw lines, and especially other things.  ArtPaint, for
 example, draws its temporary rectangles and ellipses with OP_INVERT.

 Would it be reasonable to simply inhibit anti-aliasing if OP_INVERT is
 selected?  It's probably the only situation in which that mode is used.
 Haven't looked at the code, but I suspect it wouldn't be hard to
 implement.

--
Ticket URL: <http://dev.haiku-os.org/ticket/10007>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: