ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 ImageEn 4.x Feature Request

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
nwscomps Posted - Jul 13 2011 : 07:07:19
I have a feature request for Imageen 4.x
In the iegdiplus.pas unit I would like the ability to draw lines and any other drawing primitive using floating point precision.
I see that the required entry point for the gdiplus.dll function already exists for that, but it is not used with floating point values.
So I have added a few lines of code to the iegdiplus unit and to the TIECanvas class.
I hope to see something like this (or equivalent) implemented in next version of ImageEn 4 (of which I have just purchased the yearly subscription)
So here's the code I am using, in order to draw a path of lines with floating point precision.
This modification is very important to draw nicely antialiased paths, when you need subpixel accuracy, which is always needed
when drawing for example curves and complex paths.

//Francesco Savastano --START PATCH (declares a type to handle a floating point precision Point)
TIECanvasDoublePoint = record
X: double;
Y: double;
end;
TIECanvasDoublePointArray = array of TIECanvasDoublePoint;
//Francesco Savastano --END PATCH




//Francesco Savastano --START PATCH
procedure DrawLinesPath(thePoints: TIECanvasDoublePointArray);
//Francesco Savastano --END PATCH


//Francesco Savastano --START PATCH
procedure TIECanvas.DrawLinesPath(thePoints: TIECanvasDoublePointArray);
var
Path: pointer;
i: integer;
begin
IE_GdipCreatePath(0, Path);
try
for i := 0 to high(thePoints) - 1 do
begin
IE_GdipAddPathLine(Path, thePoints[i].X, thePoints[i].Y,
thePoints[i+1].X, thePoints[i+1].Y);
end;

IE_GdipDrawPath(FGraphics,FPen.FGHandle, Path);
finally
IE_GdipDeletePath(Path);
end;
end;
//Francesco Savastano --END PATCH

Francesco Savastano
Nwscomps.com
Add-ons for the ImageEn Library
2   L A T E S T    R E P L I E S    (Newest First)
fab Posted - Jul 15 2011 : 09:33:52
Thank you Francesco!

I just added your changes. Now TIECanvas has DrawLinesPath method.
nwscomps Posted - Jul 14 2011 : 10:35:55
Any Comment on the viability of my request? Maybe from Fabrizio?
Thanks

Francesco Savastano
Nwscomps.com
Add-ons for the ImageEn Library