copy a portion of picture

copy a portion of picture

Postby Silvio » Sat Apr 25, 2009 1:27 pm

I f i have a picture on a window or dialog How I can take with the mouse a box ( dotted) and zoom it and print only that portion of that image ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: copy a portion of picture

Postby ukoenig » Mon Apr 27, 2009 4:05 pm

Hello Silvio,

I think, a solution could be, to use sliders around the dialog with the image.
with that, You could define the Top-, Left-, Bottom-, Right-Position of the Imagepart.
The Slider-position will define the borders of the Image-area, You want to save.

In one of my new tools, I use this solution, to create Gradient-Images.
I can resize and save the new Image.
For this function, I only have to define Bottom- and Right-Position.

Image

Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: copy a portion of picture

Postby Silvio » Mon Apr 27, 2009 4:39 pm

Uwe,
from Otto google sample :
Code: Select all  Expand view
Function Mappa_google()

   local oDlg, oActiveX
   local cStreet := PadR( "SAN MARINO", 80 )
   local cCity := PadR( "TERAMO", 80 )
   local cCountry := PadR( "ITALY", 80 )
   DEFINE DIALOG oDlg RESOURCE "MAPPA"
   REDEFINE ACTIVEX oActiveX ID 100 OF oDlg PROGID "Shell.Explorer"
   REDEFINE GET cStreet ID 200 OF oDlg
   REDEFINE GET cCity ID 300 OF oDlg
   REDEFINE GET cCountry ID 400 OF oDlg
   REDEFINE BUTTON ID 1 OF oDlg ACTION Show( cStreet, cCity, cCountry, oActiveX )
   ACTIVATE DIALOG oDlg CENTERED ;
      ON INIT Show( cStreet, cCity, cCountry, oActiveX )
return nil

function Show( cStreet, cCity, cCountry, oActiveX )
   local cHtml := MemoRead( ".\MAPPE\gmap.html" )
   cHtml = StrTran( cHtml, "<<STREET>>", AllTrim( cStreet ) )
   cHtml = StrTran( cHtml, "<<CITY>>", AllTrim( cCity ) )
   cHtml = StrTran( cHtml, "<<COUNTRY>>", AllTrim( cCountry ) )
   MemoWrit( "temp.html", cHtml )
   oActiveX&#058;Do( "Navigate2", CurDrive() + ":\" + CurDir() + "\temp.html" )
return nil


I wanted save with the mouse a box of this image to print it
it is possible ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 84 guests