-2

Can the start point of a graphics be set?, say when i'm adding a string to a path then drawing that path the start point usually differ, so is there a way to set the start point??

also is there any way to read AI or SVG files using VB.net?

Thank you.

  • This would be great for a **Google search**. Anyways the answers, yes and yes. Since SVG files are XML you can use the standard XML classes. – Trevor Jun 15 '15 at 03:35

1 Answers1

0

I believe what you're wanting to do is apply a transformation to your Graphics object, here is an example.

Private Sub Form1_Paint(sender As Object, e As PaintEventArgs) Handles Me.Paint
    e.Graphics.DrawRectangle(Pens.Red, 0, 0, 100, 100)
    e.Graphics.TranslateTransform(10.0F, 10.0F)
    e.Graphics.DrawRectangle(Pens.Red, 0, 0, 100, 100)
End Sub

Notice that once we call TranslateTransform all subsequent calls to draw operations will be offset by 10px from the top left. You can revert this transformation by calling e.Graphics.ResetTransform()

Artail
  • 133
  • 8