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
center_image(3) Arcan Lua API center_image(3)

center_image - move a video object relative to an external reference object

nil
center_image( vid:src, vid:ref )
center_image( vid:src, vid:ref, int:anchor )
center_image( vid:src, vid:ref, int:anchor, int x_ofs )
center_image( vid:src, vid:ref, int:anchor, int x_ofs, y_ofs )

This positions the center of src relative to the center anchor point on ref . The anchor point can be changed by specifying the anchor object to one of: ANCHOR_UL : upper-left, ANCHOR_CR : upper-center, ANCHOR_UR : upper-right, ANCHOR_CL : center-left, ANCHOR_C : center, ANCHOR_CR : center-right, ANCHOR_LL : lower-left, ANCHOR - LC : lower-center, ANCHOR_LR : lower-right. The final position can also be shifted by specifying x_ofs (px) and y_ofs . This is a one-time alignment and resolves src and ref into world-space when calculating the final coordinates. For automatic response to changes in ref , use the link_image function.

function center_image0()
      local a = fill_surface(64, 32, 255, 0, 0);
      local b = fill_surface(127, 127, 0, 255, 0);
      show_image({a, b});
      center_image(a, b);
end

link_image(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.