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

copy_surface_properties - Copy key surface properties from one VID to another.

nil
copy_surface_properties( srcvid, dstvid )

This function will first resolve the current surface properties of srcvid into world space and then store the result in dstvid . This covers position, orientation, opacity and scale.

1
The resolved properties will not be translated into the local coordinate space of dstvid , thus the results may be undesired if dstvid has its dimensions linked relative to another object than worldid.
2
Scale is treated differently due to its relation with the initial width,height of the source. This is solved by translating the resolved dimension into a scale factor.
3
The rotation transfer does not take any rotation origo offset into account.
4
Using the same object for src and for dst is prohibited.

function copy_surface_properties0()
      a = fill_surface(64, 64, 255, 0, 0);
      blend_image(a, 0.5);
      move_image(a, 100, 100);
      rotate_image(a, 300);
      resize_image(a, 128, 128);
      b = fill_surface(16, 16, 0, 255, 0);
      copy_surface_properties(a, b);
      move_image(a, 0, 0);
end

function copy_surface_properties0()
      a = fill_surface(32, 32, 255, 0, 0);
      copy_surface_properties(a, a);
end

function copy_surface_properties1()
      copy_surface_properties(nil, 1);
end

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