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
 Using Brush Demo with ImageEnVect

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
exchangeviews Posted - Mar 06 2015 : 08:45:33
I used Brush Demo to make an eraser with ImageEnVect. Now after using brush I try to insert objects (Line, Circle, Rectangle etc) but mouse cursor does not change to default. It also draws mouse movement along with object drawing. How can I release mouse cursor to default from brush style this may be a very small issue but the I am unable to manage two layers in correct way(image layer and brush layer).

Anything here to change on mousemove:

        with Layers[1] do
        begin
          bx:=Bitmap.Width;
          by:=Bitmap.Height;
          if Antialias.Checked then
          begin
            Width:=bx div 2;
            Height:=by div 2;
          end;
          px:=XScr2Bmp(X) - Width div 2;
          py:=YScr2Bmp(Y) - Height div 2;
          PosX:=px;
          PosY:=py;
          Operation:=op;
        end;


Please help.
3   L A T E S T    R E P L I E S    (Newest First)
w2m Posted - Mar 08 2015 : 14:12:01
It looks like you have made substantial changes to the Brush drawing demo so it is hard to say exactly what is wrong without seeing your code, but you have to change the brush drawing to use a transparent brush (BrushStyle = bsClear) with a clBlack Pen color with a (PenStyle=psSolid) to draw the ellipse for an erase brush. That way you will get a clear brush that only shows a non-filled "clear" ellipse for use with erase.

I suspect you would be better off drawing the brush "cursor" (it is not really a cursor..) it is a brush... in the OnDrawBackBuffer event instead of in the OnMouseMove event like the demo does.

A simple brush drawing demo with erase and GDIPlus has been uploaded here: http://www.imageen.com/ieforum/topic.asp?whichpage=1.7&TOPIC_ID=1446#7367

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
exchangeviews Posted - Mar 08 2015 : 13:09:32
Hi Nigel,

Unfortunately trick to use AutoCursors as false did not work. I am still getting mouse drag brush color when I try to draw a circle after using brush. See the screenshot below:


xequte Posted - Mar 06 2015 : 23:34:58
Hi

You need to set ImageEnView1.AutoCursors to false if you want to disable ImageEn's automatic changing of the cursor:

http://www.imageen.com/help/TImageEnView.AutoCursors.html

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