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
 IEGDIPlus and EndCaps

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
w2m Posted - Mar 29 2015 : 17:45:22
When using IEGDIPlus how do you draw a line with square ends, when UseGDIPlus is False?
iIECanvas := TIECanvas.Create(ImageEnView1.IEBitmap.Canvas,
  AntiAlias1.Checked, UseGDIPlus1.Checked, ImageEnView1.Bitmap);
iPenColor := PenColor1.Selected;
iPenAlpha := StrToIntDef(PenAlpha1.Text, 255);
iIECanvas.Pen.Color := iPenColor;
iIECanvas.Pen.Style := psSolid;
iIECanvas.Pen.Width := iPenSize;
iIECanvas.Brush.Color := iPenColor;
iIECanvas.Brush.BackColor := iPenColor;
iIECanvas.Brush.Style := bsClear;
iIECanvas.Brush.Transparency := iPenAlpha;
if iPenSize > 1 then
begin
  iLogBrush.lbStyle := BS_Solid;
  iLogBrush.lbColor := iPenColor;
  iLogBrush.lbHatch := 0;
  iIECanvas.Pen.Handle := ExtCreatePen(PS_Geometric or PS_Solid or
    PS_ENDCAP_SQUARE, iPenSize, iLogBrush, 0, nil);
end
else
begin
  iIECanvas.Pen.Color := iPenColor;
  iIECanvas.Pen.Width := iPenSize;
  iIECanvas.Pen.Style := psSolid;
end;
iIECanvas.MoveTo(AStartX, AStartY);
iIECanvas.LineTo(ALastX, ALastY);
iIECanvas.Free();

This does not draw square ends.

You can not set the LogBrush.Pen.Color when drawing the alphachannel because when you do, the alphachannel is overwritten...

I think GDIPLus has a method do this but it is not part of IEGDIPlus: _GDIPlus_PenSetEndCap. Can this be added to IEGDIPlus?

When UseGDIPlus is True lines have square ends automatically.
Unfortunately, if USeGDIPlus is False lines have round ends.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Mar 31 2015 : 11:45:32
Hi Bill

I'll investigate when I am back in the office.


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com