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單位為坐標(biāo),不是像素。 用pt / dp指定位置和大小 (板栗:設(shè)計(jì)圖的1倍值,Sketch里的內(nèi)置的設(shè)備的尺寸) ,Origami將以合適的密度顯示圖層。 例如,iPhone 7的點(diǎn)數(shù)為375x667 (板栗:設(shè)計(jì)的1倍圖) ,但像素為750x1334 (板栗:設(shè)計(jì)的2倍圖) 。
(板栗:圖層屬性窗口中有兩種坐標(biāo),一種是錨點(diǎn)Anchor坐標(biāo),用于對象的定位和對齊方式;另一種的圖層的中心點(diǎn)Pivot坐標(biāo),像Ps中旋轉(zhuǎn)時(shí)會有一個中心點(diǎn),旋轉(zhuǎn)時(shí)以那個點(diǎ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.
默認(rèn)情況下,坐標(biāo)原點(diǎn)(x:0,y:0)在屏幕的中心。 X軸坐標(biāo),原點(diǎn)向右為正數(shù),向左為負(fù)數(shù)。Y軸坐標(biāo),原點(diǎn)向下為正數(shù),向上為負(fù)數(shù)。
For illustration, below is a Layer Group of height 400 pixels and width 300 pixels:
例如,下面是一個圖層在屏幕中的坐標(biāo),圖層高400寬300:
Anchor Point 坐標(biāo)錨點(diǎn)
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.
更改錨點(diǎn)會改變模塊的坐標(biāo)原點(diǎn)位置。 錨點(diǎn)可以通過[Point]模塊控制,X和Y的值可以是0~1之間的任何數(shù)。
Here's an example of a Text Layer positioned from the "Top Left" Anchor Point:
下面是一個錨點(diǎn)在左上角的示意圖:
From the bottom right:
錨點(diǎn)在右下角的文字圖層:
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 圖層中心點(diǎn)
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)的中心點(diǎn),這個中心點(diǎn)可以和錨點(diǎn)分開控制。中心點(diǎn)可以通過[Point]模塊控制,X和Y的值可以是0~1之間的任何數(shù)。