|
ImageViewPort | ||
ImageViewPort ImageNumber, X1, Y1, X2, Y2 | ||
Parameters: ImageNumber = The identifier of this image X1 = The top left hand X position of the viewport Y1 = The top left hand Y position of the viewport X2 = The bottom right hand X position of the viewport Y2 = The bottom right hand Y position of the viewport |
||
Returns: NONE | ||
ImageViewPort defines the rendering boundaries of an image. These boundaries only take effect when the image is being rendered to, not when it's drawn. The Viewport is the clipping boundary for the image. Normally when you draw to an image or the screen, our graphics will be clipped to the image/screen edges. What a viewport does, is it allows you to choose a section of the screen/image that you'd like all future drawing operations to be clipped against. This allows us to render graphics to a certain area within an image, without damaging the pixels outside the area. FACTS: * By default an images viewport will be set to 0,0 to ImageWidth,ImageHeight * Viewport regions can not exceeed the size of the image. * Applying a ViewPort to an Image only takes effect when the Image is being rendered to ! (see: RenderToImage) * To draw a section of image see CopyRect, TextureQuad Mini Tutorial: Create an image, change it's viewport, and show the effects of the change.
This example would output.
|
Related Info: | GetImageViewPortX1 | GetImageViewPortX2 | GetImageViewPortY1 | GetImageViewPortY2 : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |