You've already forked lazarus-ccr
Improves the viewer
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1492 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -62,11 +62,18 @@ begin
|
|||||||
|
|
||||||
notebook.PageIndex := 0;
|
notebook.PageIndex := 0;
|
||||||
|
|
||||||
|
Drawer.Clear;
|
||||||
|
|
||||||
Vec := TvVectorialDocument.Create;
|
Vec := TvVectorialDocument.Create;
|
||||||
try
|
try
|
||||||
Vec.ReadFromFile(editFileName.FileName, vfDXF);
|
Vec.ReadFromFile(editFileName.FileName, vfDXF);
|
||||||
Drawer.Drawing.Width := Round(Vec.Width);
|
|
||||||
Drawer.Drawing.Height := Round(Vec.Height);
|
// We need to be robust, because sometimes the document size won't be given
|
||||||
|
if Vec.Width < 100 then Vec.Width := Drawer.Width;
|
||||||
|
if Vec.Height < 100 then Vec.Height := Drawer.Height;
|
||||||
|
|
||||||
|
Drawer.Drawing.Width := Round(Vec.Width * spinScale.Value);
|
||||||
|
Drawer.Drawing.Height := Round(Vec.Height * spinScale.Value);
|
||||||
Drawer.Drawing.Canvas.Brush.Color := clWhite;
|
Drawer.Drawing.Canvas.Brush.Color := clWhite;
|
||||||
Drawer.Drawing.Canvas.FillRect(0, 0, Drawer.Drawing.Width, Drawer.Drawing.Height);
|
Drawer.Drawing.Canvas.FillRect(0, 0, Drawer.Drawing.Width, Drawer.Drawing.Height);
|
||||||
DrawFPVectorialToCanvas(
|
DrawFPVectorialToCanvas(
|
||||||
|
Reference in New Issue
Block a user