New topic: 

Canvas Question: Resizing a Picture

<http://forums.realsoftware.com/viewtopic.php?t=47528>

         Page 1 of 1
   [ 4 posts ]                 Previous topic | Next topic          Author  
Message        mikecotrone          Post subject: Canvas Question: Resizing a 
PicturePosted: Sat Apr 06, 2013 9:49 pm                         
Joined: Tue Mar 05, 2013 2:33 pm
Posts: 26
Location: North Carolina                In my app I have a border that is drawn 
around an icon picture. I am wanting to add a "resize" capability when you grab 
the bottom right hand corner of the picture with your mouse. 

Could someone point me into the right direction? I am trying to do this without 
plugins to start.

Thanks!      
_________________
Mike Cotrone - CCIE #8411 R&S, CCIE #8411 Voice
Chief Technology Officer 
Onepath Systems, LLC

Real Studio 2012 R2.1 Enterprise, Mac OS, Windows, Ubuntu Linux  
                             Top                DaveS          Post subject: 
Re: Canvas Question: Resizing a PicturePosted: Sun Apr 07, 2013 9:14 am         
                        
Joined: Sun Aug 05, 2007 10:46 am
Posts: 4728
Location: San Diego, CA                Are you asking how to drag?
or how to resize the picture once you have decided its new coordinates.


Both can be done without plugins ...... I wrote an entire MSPAINT like 
application  in pure RealBasic without a single plugin...      
_________________
Dave Sisemore
MacPro, OSX Lion 10.7.4 RB2012r1
Note : I am not  interested in any solutions that involve custom Plug-ins of 
any kind  
                             Top                mikecotrone          Post 
subject: Re: Canvas Question: Resizing a PicturePosted: Sun Apr 07, 2013 9:39 
am                         
Joined: Tue Mar 05, 2013 2:33 pm
Posts: 26
Location: North Carolina                DaveS wrote:Are you asking how to drag?
or how to resize the picture once you have decided its new coordinates.


Both can be done without plugins ...... I wrote an entire MSPAINT like 
application  in pure RealBasic without a single plugin...

Hi Dave! I have already implemented dragging my images around while having a 
border around the image to highlight it when selected.

What I would like to do now (but don't know where to start to look on how to) 
is the following:.

1. Select Image
2. Left Click (and hold the click) on the right hand corner of image
3. Move the mouse in any direction which will resize the image
4. Let go of the mouse click to keep desired sizing.

Similar to MSPaint, Visio, etc.

Thoughts and thank you once again!     
_________________
Mike Cotrone - CCIE #8411 R&S, CCIE #8411 Voice
Chief Technology Officer 
Onepath Systems, LLC

Real Studio 2012 R2.1 Enterprise, Mac OS, Windows, Ubuntu Linux  
                             Top                DaveS          Post subject: 
Re: Canvas Question: Resizing a PicturePosted: Sun Apr 07, 2013 9:45 am         
                        
Joined: Sun Aug 05, 2007 10:46 am
Posts: 4728
Location: San Diego, CA                1. Select Image
   Seems if you can drag it around, you must have already selected it


2. Left Click (and hold the click) on the right hand corner of image
    remember the X,Y coor of where you clicked



3. Move the mouse in any direction which will resize the image
    calculate the delta from X/Y in step 2 above and draw resized image (see 
DRAWPICTURE



4. Let go of the mouse click to keep desired sizing.
  Let go... you already have the resized image in #3



Now of course it is impossible to tell you exactly how to implement those steps 
as the method depends on too many factors (such as how you are storing images, 
how you are displaying things now.  But I will tell you... that you had best be 
handling the image in a PICTURE element, and not expecting the display canvas 
to do ANY of the work      
_________________
Dave Sisemore
MacPro, OSX Lion 10.7.4 RB2012r1
Note : I am not  interested in any solutions that involve custom Plug-ins of 
any kind  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 4 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to