Re: gdi+ and XOR of fill area

Tech-Archive recommends: Fix windows errors by optimizing your registry



"Keven Corazza" <KevenCorazza@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:FE824302-3C67-469A-A224-C8C02E587196@xxxxxxxxxxxxxxxx
Thank you for the answer but the real problem for me is how to update the
selected area while mouse is moving.

I mean, I draw the first filled rectangle between the starting point and
the
current mouse position; then the mouse change its position, and I've to
update the rectangle.

If the new rectangle is lower how can I remove the previous rectangle ?

With the standard GDI and Pen I can set XOR mode so if I draw a line over
existing line this will be removed.

I hope to have explained better the result that I would like to obtain.

As Grzegorz said, you can't "undraw" what you've drawn. You could
potentially do this with the alpha blended area but the result would not be
exactly what you started with (due to integer rounding color value that are
only from 0 to 255). I believe MS would be double buffering the area and
drawing the whole lot again, that's how I did the same thing anyway.

Michael


.



Relevant Pages

  • RE: GDI+ Clip Region allows 0.0f width pen to draw through
    ... Just to make this more outrageous if you draw the vertical lines from the ... I took the previous code I posted and made the panel anchor to all four ... private void panel1_SizeChanged ... In other words create a rectangle that is a wider than the panel. ...
    (microsoft.public.win32.programmer.gdi)
  • Re: My earlier post was Horizontal Line
    ... The code below is the exact of my Report module. ... It can draw the table ... starting point for the line or rectangle. ... QBColor function to specify the color. ...
    (microsoft.public.access.formscoding)
  • Zero Width Pen Draws through clipped region...
    ... Exclude the rectangle from the graphics clip region. ... Draw a line down the panel. ... IF you use a pen that is more than one pixel the clipping works correctly. ...
    (microsoft.public.dotnet.framework.drawing)
  • RE: TreeView multiple selections
    ... But with this behavior I can't draw a node to normal after selecting twice ... .Net2.0 has added the build-in support for custom-draw. ... rectangle based on your requirement. ... Dim focusPen As New Pen ...
    (microsoft.public.dotnet.general)
  • Re: Calculate the interior of a rectangle
    ... I expected them to draw from the ... native VB method to draw a small blue rectangle and the equivalent API ... Private Declare Function MoveToEx Lib "gdi32" (ByVal hdc As Long, ...
    (microsoft.public.vb.general.discussion)