1.10 Concepts 概念 - Coordinates 坐標


Origami Studio use pt/dp coordinates instead of pixels. Specify position or size in pt/dp, and Origami will handle rendering layers at the appropriate density. For instance an iPhone 7 is 375x667 in points, but 750x1334 in pixels.

Origami Studio使用pt / dp單位為坐標,不是像素。 用pt / dp指定位置和大小 (板栗:設計圖的1倍值,Sketch里的內(nèi)置的設備的尺寸) ,Origami將以合適的密度顯示圖層。 例如,iPhone 7的點數(shù)為375x667 (板栗:設計的1倍圖) ,但像素為750x1334 (板栗:設計的2倍圖) 。

(板栗:圖層屬性窗口中有兩種坐標,一種是錨點Anchor坐標,用于對象的定位和對齊方式;另一種的圖層的中心點Pivot坐標,像Ps中旋轉(zhuǎn)時會有一個中心點,旋轉(zhuǎn)時以那個點為圓心)

By default, the origin (x: 0, y: 0) is in the center of the device screen. On the X axis, coordinates increase as you move right, and decrease as you move left. On the Y axis, coordinates increase as you move down, and decrease as you move up.

默認情況下,坐標原點(x:0,y:0)在屏幕的中心。 X軸坐標,原點向右為正數(shù),向左為負數(shù)。Y軸坐標,原點向下為正數(shù),向上為負數(shù)。

For illustration, below is a Layer Group of height 400 pixels and width 300 pixels:

例如,下面是一個圖層在屏幕中的坐標,圖層高400寬300:


Anchor Point 坐標錨點

Anchor points change the origin of the coordinate system for that patch. Anchor points can be defined in the Patch Editor with a Point patch, where X and Y are any decimal 0-1.

更改錨點會改變模塊的坐標原點位置。 錨點可以通過[Point]模塊控制,X和Y的值可以是0~1之間的任何數(shù)。

Here's an example of a Text Layer positioned from the "Top Left" Anchor Point:

下面是一個錨點在左上角的示意圖:

From the bottom right:

錨點在右下角的文字圖層:

If you want to inset it by 40 pixels, give it an X Position of -40 and a Y Position of -40.

如果你想把圖層向左上方移動40像素,X和Y的值都要輸入-40。


Pivot 圖層中心點

The pivot port changes the point about which a layer scales and rotates, and can be controlled separately from anchor points. Pivots can be defined in the Patch Editor with a Point patch, where X and Y are any decimal 0-1.

Pivota端口是圖層縮放和旋轉(zhuǎn)的中心點,這個中心點可以和錨點分開控制。中心點可以通過[Point]模塊控制,X和Y的值可以是0~1之間的任何數(shù)。


?? Custom Devices 自定義設備 ? States & Pulses ??

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容