Page 1 of 1

question gdiplus

Posted: Tue Sep 24, 2024 11:20 am
by Silvio.Falconi
If I made a figure sample :


Image

local oGraphics := Graphics():New( hDC )
local oPen := Pen():New( 255, 0, 0, 255 , 10 , .T.)
local oBrush2 := Brush():NewSolidBrush( 150, 0, 255, 167 )

oPen:SetInset( )
oGraphics:DrawEllipse( oPen2, oBrush2 , 500, 100, 60, 60 )


then I want clear this figure to create another over ,

sample : oGraphics:DrawRect( oPen2, oBrush2 , 500, 100, 70, 60 )



so how I can erase the first figure ? how I must do ?

Re: question gdiplus

Posted: Tue Sep 24, 2024 6:05 pm
by Otto
Silvio,
Redraw the background only over the part where the old figure is.
oGraphics:DrawEllipse( oPen2, oBrush2 , 500, 100, 60, 60 )
but for oBrush2 take the background brush.
Or clear the entire drawing area.

Best regards,
Otto

Re: question gdiplus

Posted: Wed Sep 25, 2024 6:17 am
by Silvio.Falconi
Otto wrote:Silvio,
Redraw the background only over the part where the old figure is.
oGraphics:DrawEllipse( oPen2, oBrush2 , 500, 100, 60, 60 )
but for oBrush2 take the background brush.
Or clear the entire drawing area.

Best regards,
Otto
>Redraw the background only over the part where the old figure is.

and how do you do it? Let's assume that I don't know the coordinates of the previous drawing, let's not sit on the chair and write sentences without providing valid help with instructions and working scripts

>but for oBrush2 take the background brush.
>Or clear the entire drawing area.


I actually asked how to clean the whole area but I didn't find anything on gdiplus

Image

Mr Otto you ever worked with gdiplus?

Re: question gdiplus

Posted: Wed Sep 25, 2024 1:59 pm
by Otto
oGraphics:DrawEllipse( oPen2, oBrush2 , 500, 100, 60, 60 )

Isn't it this you want to delete?