Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi.

I'm drawing on picturebox with backgroudn image.

How can I clear graphics?

 

I want that Background image is still shown.

 


       Dim G As Graphics = Me.picMap.CreateGraphics()

       'coordinate sistem
       Dim TranslateDx As Long = -375050
       Dim TranslateDy As Long = -194050
       Dim ScaleDx As Single = Me.picMap.Width / (624250 - 375050)
       Dim ScaleDy As Single = Me.picMap.Height / (29850 - 194050)

       G.TranslateTransform(TranslateDx, TranslateDy, MatrixOrder.Append)
       G.ScaleTransform(ScaleDx, ScaleDy, MatrixOrder.Append)
       

'here I want to clear graphics to draw new line


       'draw line
       PenStojisce.EndCap = LineCap.Triangle
       G.DrawLine(PenStojisce, Me.BindingContext(ds.Tables(0)).Current("X1"), Me.BindingContext(ds.Tables(0)).Current("Y1"), Me.BindingContext(ds.Tables(0)).Current("X2"), Me.BindingContext(ds.Tables(0)).Current("Y2"))


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...