AttachCopyToView 指令

来自GeoGebra Manual
Nuhero讨论 | 贡献2024年1月8日 (一) 04:34的版本 (建立内容为“<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|scripting}} ;AttachCopyToView( <Object>, <View 0|1|2> ) :If ''View = 0'', a copy of given object is c…”的新页面)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航搜索
Accessories dictionary.png
本頁為官方文件,一般使用者無法修改,若有任何誤謬,請與官方聯絡。如欲編輯,請至本頁的開放版


AttachCopyToView( <Object>, <View 0|1|2> )
If View = 0, a copy of given object is created. For View = 1 or View = 2 this command creates a dependent copy of given object whose size in given Menu view graphics.svg Graphics View is constant.
範例:
Let poly = Polygon((0, 0), (1, 0), (1, 1), (0, 1)).
If Graphics View 1 is active, AttachCopyToView(poly, 1) creates a square with the same size at the same position.
備註: Once the copy is created, three other arguments are added to the command definition.
AttachCopyToView( <Object>, <View 0|1|2>, <Point 1>, <Point 2>, <Screen Point 1>, <Screen Point 2> )
If View = 0, a copy of given object is created. For View = 1 or View = 2 this command creates a dependent copy of given object whose size in given Menu view graphics.svg Graphics View is transformed using the affine transform that maps Point 1 to a point whose screen coordinates (in pixels) are equal to Screen Point 1, and Point 2 to a point with screen coordinates equal to Screen Point 2.
範例:
Let poly = Polygon((0, 0), (1, 0), (1, 1), (0, 1)).
If Graphics View 1 is active, AttachCopyToView(poly, 1, (0, 0), (1, 1), (0, 0), (100, 100)) creates a 100px x 100px square in the top left corner of the Graphics View.
備註: All points of the object are copied, even if they lie outside the view.
© 2024 International GeoGebra Institute