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
 Rulerbox like Photoshop

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
harry stahl Posted - Jul 25 2016 : 17:43:44
I want to use the rulerbox like in Photoshop, that means Image centered. To adjust the zero-Point I do it like this:


HorizRuler.ViewPos := -ImageEnView1.OffsetX;
VertRuler.ViewPos  := -ImageEnView1.OffsetY;


The MousemoveEvent I have adjusted like this:


procedure TForm1.ImageEnView1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
  if Lockgripstointegervalue1.Checked then
  begin
    HorizRuler.GripsPos[0] := trunc(ImageEnView1.XScr2Bmp(X) / m_dpi) - ImageEnView1.OffsetX;
    VertRuler.GripsPos[0]  := trunc(ImageEnView1.YScr2Bmp(Y) / m_dpi) - ImageEnView1.Offsety;
  end
  else
  begin
    HorizRuler.GripsPos[0] := ((ImageEnView1.ViewX - HorizRuler.OffsetX + X) / HorizRuler.DotPerUnit) - ImageEnView1.OffsetX;
    VertRuler.GripsPos[0]  := ((ImageEnView1.ViewY - VertRuler.OffsetY + Y) / VertRuler.DotPerUnit) - ImageEnView1.Offsety;
  end;
end;


All works fine:



But it works not, when the Image is zoomed. What can I do here, to adjust the postion of the mouse-grip and the start of the zero-point?

And an other point: when the Image is zoomed, I want that the rulerbox is zoomed also (and not with a new numbering, see screenshot):



By the way: In an later update it would be fine, if one could link the Horizontal and vertical rulerbox to the ImagenEnview via the object-inspector and all this work what now has to be done by the developer would be into the "intelligent" rulerbox.

HS
4   L A T E S T    R E P L I E S    (Newest First)
harry stahl Posted - Jul 31 2016 : 17:42:44
OK, I've send you an email.

HS
xequte Posted - Jul 30 2016 : 23:48:10
Hi Harry

I won't post it just yet, because it uses some v6.3.1 features. But if you want it to fix your Photoshop ruler issue, just email me.



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
harry stahl Posted - Jul 27 2016 : 16:08:03
That is fine. If possible, it would be helpful to post it here (or in the demoe section of your homepage).

HS
xequte Posted - Jul 27 2016 : 00:34:28
Hi

I'm working on an updated demo...



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