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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Drawing rectangle with width > 1
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

pssien

10 Posts

Posted - Dec 03 2017 :  07:38:22  Show Profile  Reply
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.



w2m

USA
1990 Posts

Posted - Dec 03 2017 :  09:59:42  Show Profile  Reply
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
Go to Top of Page

xequte

39053 Posts

Posted - Dec 03 2017 :  15:56:58  Show Profile  Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: