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
 Using Brush Demo with ImageEnVect
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

exchangeviews

India
39 Posts

Posted - Mar 06 2015 :  08:45:33  Show Profile  Reply
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.

xequte

38607 Posts

Posted - Mar 06 2015 :  23:34:58  Show Profile  Reply
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
Go to Top of Page

exchangeviews

India
39 Posts

Posted - Mar 08 2015 :  13:09:32  Show Profile  Reply
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:


Go to Top of Page

w2m

USA
1990 Posts

Posted - Mar 08 2015 :  14:12:01  Show Profile  Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: