Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 magnification
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
beedub




PostPosted: Sun Apr 27, 2003 2:30 pm   Post subject: magnification

i need suggestions on how to do magnification... i was thinking that, maybe you could, make a delay then remake the smaller version of the picture. I was wondering if there was any easier way.
Sponsor
Sponsor
Sponsor
sponsor
Catalyst




PostPosted: Sun Apr 27, 2003 2:40 pm   Post subject: (No subject)

heres something i made quickly, there prob a better way to do it tho

note: only works in version 4

code:

View.Set ("offscreenonly,nobuttonbar,graphics:640;640,position:300;300")
drawfillbox (0, 0, maxx, maxy, 7)
drawfilloval (100, 100, 100, 100, blue)
drawfillstar (300, 200, 600, 500, red)
drawline (100, 200, 300, 400, 14)
var back : int := Pic.New (0, 0, maxx, maxy)
var hold : int
var x, y, z : int
loop
mousewhere (x,y,z)
    View.Update
    if z = 1 then
        hold := Pic.New (x - 100, y - 100, x + 100, y + 100)
        hold:=Pic.Scale (hold,maxx,maxy)
        loop
        mousewhere (x,y,z)     
        Pic.Draw (hold, 0, 0, picCopy)
        View.Update
        exit when z=0
        end loop
    else
        Pic.Draw (back, 0, 0, picCopy)
    end if
end loop
Asok




PostPosted: Sun Apr 27, 2003 2:41 pm   Post subject: (No subject)

Pic.Scale (picID, newWidth, newHeight : int) : int

Pic.Scale is used to create a new picture by scaling (resizing) an already existing picture. Rotation can either be around a specific point in the picture (often used for rotating a picure in place) or just a general rotation.

The newWidth and newHeight parameters are the desired width and height of the new picture. The newWidth and newHeight parameters may be negative, in which case the picture is mirror image (newWidth is negative) or upside-down (newHeight is negative) and the absolute values are used for the new width and height values.

In order to scale a picture while retaining its original aspect ratio, scale with multiples of the original width and height. The width and height of a picture can be obtained using Pic.Width and Pic.Height.


Enjoy Smile
beedub




PostPosted: Sun Apr 27, 2003 3:32 pm   Post subject: (No subject)

so.. what i do is i set a procedure, for the original picture. Then that can be my pic.ID?
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: