Resizing GraphicsPath

resize

What I mean is that, when I create a GraphicPath object and tries to resize the image drawn and saved into the GraphicsPath and show that image again it doesnt seems to work. Images can be resized but when I try to resize a GraphicsPath or Drawing it gives me an error. Dont Know if it makes sense to you? Is there a way to save a GraphicsPath or Drawing as a bit map? Thanks in advance.
 
Yes, though i dont know the exact code, you can save images, they just need to be drawn to a picture box, then the pixture box can be saved as a .bmp
 
Error on Saving GraphicsPath

I did try to save graphic path but it only saved the background and not the foreground. could someone help me...
 
Create a matrix object, scale the matrix, and then use the matrix in the transform method of the GraphicsPath:
[VB]
Dim G As Graphics = Me.CreateGraphics
Dim pa as New GraphicsPath

pa.AddLine(......)
pa.AddBezier(......)
pa.AddLine(......)
pa.CloseFigure

draw the path before resize...
G.DrawPath(Pens.Black, pa)

Dim ma as New Matrix

scale the matrix by 150%...
ma.Scale(1.5, 1.5)

apply the matrix...
pa.Transform(ma)

draw the path after resize...
G.DrawPath(Pens.Black, pa)
[/VB]

Hope that helps.
 
Last edited by a moderator:
Back
Top