Difference between revisions of "love.graphics.setLineStipple"
(rewrote an exerpt that i had explicitly copied directly from an opengl book) |
|||
Line 11: | Line 11: | ||
Nothing. | Nothing. | ||
== Additional Information == | == Additional Information == | ||
− | + | A stipple pattern is made up of a 16bit sequence of 0s and 1s, Just like binary. | |
− | + | The pattern is repeated to complete the line. Using the repeat will stretch the pattern and multiplies each 1 and 0. For example if three 1s are consecutively placed they are stretched to six if the repeat is 2. The maximum repeat is 255, and the minimum repeat is 1. | |
− | |||
− | |||
− | |||
− | + | A 1 is a a cue to draw a pixel whereas 0 is the opposite and does not draw a pixel, This is done per pixel for the given line. | |
− | + | A pattern is read from back to front. | |
− | + | 0x3F07 would equal to 0011111100000111 in binary. | |
− | + | You can visualise the pattern by reading the binary sequence backwards. | |
− | |||
== See Also == | == See Also == | ||
* [[parent::love.graphics]] | * [[parent::love.graphics]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
{{#set:Description=Sets the line stipple pattern.}} | {{#set:Description=Sets the line stipple pattern.}} |
Revision as of 06:05, 19 August 2010
Sets the line stipple pattern.
Function
Synopsis
love.graphics.setLineStipple( pattern, repeat )
Arguments
Returns
Nothing.
Additional Information
A stipple pattern is made up of a 16bit sequence of 0s and 1s, Just like binary.
The pattern is repeated to complete the line. Using the repeat will stretch the pattern and multiplies each 1 and 0. For example if three 1s are consecutively placed they are stretched to six if the repeat is 2. The maximum repeat is 255, and the minimum repeat is 1.
A 1 is a a cue to draw a pixel whereas 0 is the opposite and does not draw a pixel, This is done per pixel for the given line.
A pattern is read from back to front.
0x3F07 would equal to 0011111100000111 in binary.
You can visualise the pattern by reading the binary sequence backwards.