VoyForums

VoyUser Login optional ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 12345678910 ]


[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 17:33:20 07/17/08 Thu
Author: Jon Grewer
Subject: 1 suggestion

I have been using your library and am very pleased. I needed and so added the following code to EnRubber.pas:

procedure TRubberbandMouseHandler.SetSourceSelection(Rect: TRect );
var
XFactor, YFactor: double;
begin
// GetSelection(Rect);

XFactor := GetXFactor;
YFactor := GetYFactor;

Rect.Left := Round(Rect.Left / XFactor);
Rect.Right := Round(Rect.Right / XFactor);
Rect.Top := Round(Rect.Top / YFactor);
Rect.Bottom := Round(Rect.Bottom / YFactor);

SetSelection(Rect);
end;

This allowed me to set the selection coordinates relative to actual graphic size rather than the displayed size. Please feel free to include this code.

[ Next Thread | Previous Thread | Next Message | Previous Message ]

VoyUser Login ] Not required to post.
Post a public reply to this message | Go post a new public message
* Notice: Posting problems? [ Click here ]
* HTML allowed in marked fields.
Message subject (required):

Name (required):

  Expression (Optional mood/title along with your name) Examples: (happy, sad, The Joyful, etc.) help)

  E-mail address (optional):

Type your message here:


Notice: Copies of your message may remain on this and other systems on internet. Please be respectful.

[ Contact Forum Admin ]


Forum timezone: GMT-5
VF Version: 2.94, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2008 Voyager Info-Systems. All Rights Reserved.