“AttachCopyToView 指令”的版本间的差异

来自GeoGebra Manual
跳转至: 导航搜索
 
第3行: 第3行:
 
:若 <視區> 為 0,(會在主繪圖區)建立 <物件> 的應變副本。若 <視區> 為 1 或 2,會在指定的 [[File: Menu view graphics.svg|link=|16px]] (主、副)[[繪圖區]]建立 <物件> 的應變副本,但這些副本的尺寸會是常數。
 
:若 <視區> 為 0,(會在主繪圖區)建立 <物件> 的應變副本。若 <視區> 為 1 或 2,會在指定的 [[File: Menu view graphics.svg|link=|16px]] (主、副)[[繪圖區]]建立 <物件> 的應變副本,但這些副本的尺寸會是常數。
 
:{{Example|1=<div>令 <code><nowiki>poly = Polygon((0, 0), (1, 0), (1, 1), (0, 1))</nowiki></code>。<br>輸入 <code><nowiki>AttachCopyToView(poly, 1)</nowiki></code> 會在相同位置建立一個相同尺寸的正方形。</div>}}
 
:{{Example|1=<div>令 <code><nowiki>poly = Polygon((0, 0), (1, 0), (1, 1), (0, 1))</nowiki></code>。<br>輸入 <code><nowiki>AttachCopyToView(poly, 1)</nowiki></code> 會在相同位置建立一個相同尺寸的正方形。</div>}}
:{{Note|一旦副本建立後,GeoGebra 會自動在副本物件的定義 欄位 補上 剩下 四個引數到指令中(請參考下一個語法)。}}
+
:{{Note|一旦副本建立後,GeoGebra 會自動在副本物件的定義補上 其他 四個引數到指令中(請參考下一個語法)。}}
 
;AttachCopyToView( <物件>, <視區 0|1|2>, <點 1>, <點 2>, <螢幕點 1>, <螢幕點 2> )
 
;AttachCopyToView( <物件>, <視區 0|1|2>, <點 1>, <點 2>, <螢幕點 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 [[File: Menu view graphics.svg|link=|16px]] [[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''.
 
: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 [[File: Menu view graphics.svg|link=|16px]] [[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''.
 
:{{Example|1=<div>Let <code><nowiki>poly = Polygon((0, 0), (1, 0), (1, 1), (0, 1))</nowiki></code>. <br> If Graphics View 1 is active, <code><nowiki>AttachCopyToView(poly, 1, (0, 0), (1, 1), (0, 0), (100, 100))</nowiki></code> creates a ''100px x 100px'' square in the top left corner of the Graphics View.</div>}}
 
:{{Example|1=<div>Let <code><nowiki>poly = Polygon((0, 0), (1, 0), (1, 1), (0, 1))</nowiki></code>. <br> If Graphics View 1 is active, <code><nowiki>AttachCopyToView(poly, 1, (0, 0), (1, 1), (0, 0), (100, 100))</nowiki></code> creates a ''100px x 100px'' square in the top left corner of the Graphics View.</div>}}
 
:{{note|1=All points of the object are copied, even if they lie outside the view.}}
 
:{{note|1=All points of the object are copied, even if they lie outside the view.}}

2024年1月9日 (二) 03:37的最新版本

Accessories dictionary.png
本页为官方文件,一般使用者无法修改,若有任何误谬,请与官方联络。如欲编辑,请至本页的开放版


AttachCopyToView( <物件>, <视区 0|1|2> )
若 <视区> 为 0,(会在主绘图区)建立 <物件> 的应变副本。若 <视区> 为 1 或 2,会在指定的 Menu view graphics.svg (主、副)绘图区建立 <物件> 的应变副本,但这些副本的尺寸会是常数。
范例:
poly = Polygon((0, 0), (1, 0), (1, 1), (0, 1))
输入 AttachCopyToView(poly, 1) 会在相同位置建立一个相同尺寸的正方形。
备注: 一旦副本建立后,GeoGebra 会自动在副本物件的定义补上其他四个引数到指令中(请参考下一个语法)。
AttachCopyToView( <物件>, <视区 0|1|2>, <点 1>, <点 2>, <萤幕点 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 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