Difference between revisions of "(Image):setWrap"
(add new func) |
(mentioned image behavior in note) |
||
Line 2: | Line 2: | ||
This function sets the way an Image is repeated when it is drawn with a [[Quad| Quad]] that is larger than the image's extent. The parameters may either be 0, which indicates no repeating is to appear in the corresponding direction, or 1, which indicate the image should repeat to fill the Quad. | This function sets the way an Image is repeated when it is drawn with a [[Quad| Quad]] that is larger than the image's extent. The parameters may either be 0, which indicates no repeating is to appear in the corresponding direction, or 1, which indicate the image should repeat to fill the Quad. | ||
+ | |||
+ | N.B. If you use a Quad that is larger than the image extent and do not use setWrap to tile the image, you may get an unwanted visual effect of the image stretching all the way to fill the Quad anyway. If this is the case, just set <tt>Image:getWrap(1, 1)</tt> for all the images you want to repeat, and use Quad size to limit the image repeating. | ||
== Function == | == Function == | ||
=== Synopsis === | === Synopsis === |
Revision as of 06:24, 1 March 2010
Sets the wrapping properties of an Image.
This function sets the way an Image is repeated when it is drawn with a Quad that is larger than the image's extent. The parameters may either be 0, which indicates no repeating is to appear in the corresponding direction, or 1, which indicate the image should repeat to fill the Quad.
N.B. If you use a Quad that is larger than the image extent and do not use setWrap to tile the image, you may get an unwanted visual effect of the image stretching all the way to fill the Quad anyway. If this is the case, just set Image:getWrap(1, 1) for all the images you want to repeat, and use Quad size to limit the image repeating.
Function
Synopsis
Image:getWrap( horiz, vert )
Arguments
number horiz
- Horizontal wrapping mode of the image.
number vert
- Vertical wrapping mode of the image.
Returns
Nothing.