|
Post by u9 on Sept 12, 2007 16:04:58 GMT -5
The manual states
Now when it says default i expected that if i omitted the parameters it would "reset" to showing the entire image, but the parameters seem to be mandatory.
So my request is to make the x, y, w and h parameters optional (if possible) and if they are omitted then the SetSource is reset to show the full image.
|
|
|
Post by Guilect on Sept 13, 2007 17:43:08 GMT -5
hmmm... In order to have the parameters be optional and detect that the user wants to set the image back to its original is tricky. You have to have the user not specify any of the optional parameters. Additionally you have to assign a value to the optional parameters in order to check that against a user inputed parameter. Setting the x and y to 0,0 is easy but rather than a value for w and h I would need a function as the optional input parameter to retrieve the particular w and h for an image. VB does not allow for this. I will continue to see if there is some clever work around that can be implemented. For now something like this might do:
Graphics.SetSource image, 0, 0, Graphics.GetWidth(image), Graphics.GetHeight(image)
Also, will update manual to say : "SetSource image, x, y, w, h -- select which part of an image to display"
|
|
|
Post by u9 on Sept 14, 2007 5:29:09 GMT -5
ok, well it is not important. I just thought it would be easier to just write: graphics.SetSource image To set it back to default. As far as i can remember (without checking the manual) SetViewPort does exactly this, if one doesn't specify the parameters. That's why i suggested this. Currently I am using graphics.SetSource image, 0, 0, graphics.GetWidth(image), graphics.GetHeight(image) as one is suppose to, so no worries
|
|