Forum > FPvectorial
Solid black picture when drawing to canvas
(1/1)
biggmatt:
I've been working on a little project with fpvectorial. When i load a svg file and draw it to an image canvas i get a solid black picture.
here is the code:
--- Code: ---procedure TMainForm.Button1Click(Sender: TObject);
var
Vec: TvVectorialDocument;
filename:string;
begin
opendialog1.Execute;
Vec := TvVectorialDocument.Create;
try
Vec.ReadFromFile(opendialog1.filename,vfSVG);
image1.picture.Clear;
vec.width:=image1.Width;
vec.height:=image1.Height;
DrawFPVectorialToCanvas(Vec.GetPage(0), image1.canvas);
image1.Invalidate;
finally
Vec.Free;
end;
end;
--- End code ---
not sure what i am doing wrong. The svg files i have been loading are simple inkscape files.
seoane:
--- Code: --- image1.Canvas.Brush.Color:= clWhite;
image1.Canvas.FillRect(image1.Canvas.ClipRect);
--- End code ---
Navigation
[0] Message Index