GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
image_clip_on(3) Arcan Lua API image_clip_on(3)

image_clip_on - Control clipping for a video object.

nil
image_clip_on( vid:image )
image_clip_on( vid:image, int:mode )
image_clip_on( vid:image, int:mode=CLIP_SHALLOW, vid:cliptgt )

This changes the clipping mode for the video object referenced by image . By default the mode is CLIP_ON , which is the more expensive one. It uses a stencil buffer to draw the entire hierarchy built using link_image . It is thus useful for complex hierarchies with possibly rotated objects. Another option is CLIP_SHALLOW . This only uses the immediate parent, and will get a fast-path assuming that both objects are rotated as that can be solved by adjusting object size and texture coordinates alone. If a cliptgt is provided with the CLIP_SHALLOW clipping mode, a specific object will be used for calculating the clipping bounds rather than using the link_image specified one. This is useful when a transform hierarchy is needed, but with specific clipping anchors.

1
If a clip target is set to a non-existing or otherwise bad object or becomes invalid through deletion, clipping will revert to the image parent as if no clip target had been specified.

function image_clip_on0()
      a = fill_surface(64, 64, 255, 0, 0);
      b = fill_surface(64, 64, 0, 255, 0);
      link_image(b, a);
      move_image(b, 32, 32);
      show_image({a,b});
      image_clip_on(b, CLIP_SHALLOW);
end

function image_clip_on0()
      image_clip_on(BADID);
end

image_clip_off(3)

June 2022 image

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.