Canvas snippets: Difference between revisions

Jump to navigation Jump to search
Line 122: Line 122:


== Clipping ==
== Clipping ==
 
{{Note|{{FGCquote
|1= Scaling or any other type of transformation or changing the coordinates of individual points is definitely more efficient than clipping (which requires to change the OpenGL clip planes for every rendered object with a different clipping rectangle).
|2= {{cite web
  | url    = http://forum.flightgear.org/viewtopic.php?p=277062#p277062
  | title  = <nowiki>Re: Space Shuttle</nowiki>
  | author = <nowiki>TheTom</nowiki>
  | date  = Feb 21st, 2016
  | added  = Feb 21st, 2016
  | script_version = 0.25
  }}
}}
}}
I would suggest to refer to api.nas and look for "clip" and/or "rect" - IIRC, you need to set up a clipping rectangle by setting some kind of "clip" property and setting it to a rect value in the form of rect(...)
I would suggest to refer to api.nas and look for "clip" and/or "rect" - IIRC, you need to set up a clipping rectangle by setting some kind of "clip" property and setting it to a rect value in the form of rect(...)
{{FGCquote
{{FGCquote

Navigation menu