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
 Drawing rectangle with width > 1

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
pssien Posted - Dec 03 2017 : 07:38:22
Using as a base the ImageenPainter demo program.
I need to draw lines and rectangles with widths different of 1.
If I assign a width with the following code:
ImageEnView1.IEBitmap.Canvas.Pen.Width := 5;

And modify the last parameter of the SetSquarePen function, changing the fixed value of 1 for ImageEnView1.IEBitmap.Canvas.Pen.Width.
The rectangle or line is drawn while I am increasing the size, but if I decrease the size, some part is not undoing correctly.
See the attached image.
What must I change to solve this problem.



2   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Dec 03 2017 : 15:56:58
If you drawing from the MouseMove event, you cannot guarantee that it will be called for every pixel so you need to ensure that you paint from the last MouseMove X,Y to the current MouseMove X,Y.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
w2m Posted - Dec 03 2017 : 09:59:42
There are at least two demos in the User Demos page that shows how to correctly draw lines and rectangles. If after trying these demos you still have a problem let me know and I will provide additional help.
https://www.imageen.com/ieforum/topic.asp?TOPIC_ID=1446&whichpage=7

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development