02-Origami中文帮助-Basic-Layers

Dosen原创

这是我学习quartz composer,Origami,看官方文档翻译下来的,每天一篇,有不准确的地方希望能指出,一起交流进步。转载请与我联系,擅自转载视作侵权。


Layers      层


Layers show content, like images, in the viewer. They work like layers in Sketch and Photoshop: every layer has style attributes (e.g. position, size, an Image or Color to show...), can be different types (see list below), and can be layered on top of each other.

层是个容器,像在查看器中的图片,它们的作用像是在Sketch和Photoshop中的图层一样:每个图层有一套属性样式(比如:位置,尺寸,一张位图或是颜色),可以是不同类型,互相之间可以有层级。

Add a layer with the patch library  “ ⌘ ⏎ , or their keyboard shortcuts. Quickly add an image as a layer by dragging and dropping the image on to the Editor.

用模块库 “ ⌘ ⏎ ” 添加一个层,或者通过快捷键。通过拖拽把图片拖进编辑器来快速添加一个图片作为一个层。



1. Layer patches      层模块


Layer → “ L ”      

Display a rectangle or image. For non-rectangle shapes, use patches like Circle Image or Rounded Rectangle that create an image to plug into a Layer.

显示一个矩形或图片。对于非矩形形状来说,使用像Circle Image(圆形图片)或者Rounded Rectangle(圆角矩形)这样的模块来把一个图片放入一个层中。

In most situations, you'll be working with an image from your designs by copy-pasting or drag-and-dropping into the editor. This will automatically create a layer patch for you with the image connected.

在大多数情况下,你会用 复制-粘贴 或者 拖拽-放入 的方式把你设计中的图片放入编辑器,这样会自动地为你创建一个连接了图片的层模块。

Text Layer → “ ⇧ T ”

Display text with adjustable font settings.

显示文字,可调节字体设置。

Fill Layer →

Completely fill the containing Layer Group with a color.

用一个颜色填充满Layer Group(层组)。



2. Layer position      层位置


Layers in Origami are positioned in the center by default. You can easily position the layer in different corners of the layer group by changing the Anchor Position. Be aware that some patches (like Scroll) expect Layers to have a center anchor position.

在Origami中,层默认的位置在中心。用changing the Anchor Position(改变锚点位置)可以让你很容易的把层放置在层组的不同的角落里。

X Position behaves like Sketch and Photoshop, where increasing it moves right, and decreasing moves left. Y Position is reversed: increasing it moves up, and decreasing moves down.

X坐标就像Sketch和Photoshop中一样,向右移动它的值增加,向左移动值减少。Y坐标是向上移动值增加,向下移动值减少。

Read more about the Coordinate System.

阅读更多关于坐标系统。



3. Layer order      层顺序


Unlike the other attributes of a Layer, the order is specified with a dropdown at the top right of the Patch. You can also change the order by selecting the layer and hitting  “ ⌘ [ or “ ⌘ ] ” .

不同于层的其他属性,在模块的右上角通过下拉指定顺序。你也可以选住层,按 “ ⌘ [ ” 或 “ ⌘ ] ” 改变顺序。

To change the order of a Layer using patches, simply tweak the Z Position by a small amount (like 0.0001 pixels).

使用模块改变一个层的顺序,稍微调整Z坐标一点点(比如0.0001像素)就可以了。



4. Layer Groups      层组


Layer Groups help you organize your Layers together. Create one from the patch library or simply hit “ G  ” (tip: you can do this while hovered over an image patch to quickly group it). You can double-click or  “ ⌘ ▼  to get into a Layer Group, and click Edit Parent in the toolbar or “ ⌘ ▲ ”  to exit a Layer Group.

层组帮你组织你的层在一起。从模块库创建一个或者按 “ G  ” (提示:你可以在悬停在一个图片模块上的时候,按 “ G  ”,把它组在一起),你可以双击或者用 “ ⌘ ▼ ” 来成组,点击工具栏的Edit Parent(编辑父物体) 或者 “ ⌘ ▲ ” 来退出层组。

Make sure to group layers whenever you want to animate multiple layers together. For example, if you're sliding up a window with multiple layers inside of it, putting those layers in a layer group will let you just animate up that one group up instead of needing to have cables connected to several different layers.

确保任何时候你想要动起来层都在一个层组。举个例子,如果你想上滑一个里面有很多层的窗口,把这些层放在一个层组,会让你只需要动一个层组就能可以,而不需要给许多不同的层连线。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 195,980评论 5 462
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 82,422评论 2 373
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 143,130评论 0 325
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 52,553评论 1 267
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 61,408评论 5 358
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 46,326评论 1 273
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 36,720评论 3 386
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 35,373评论 0 254
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 39,678评论 1 294
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 34,722评论 2 312
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 36,486评论 1 326
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 32,335评论 3 313
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 37,738评论 3 299
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,009评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 30,283评论 1 251
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 41,692评论 2 342
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 40,893评论 2 335

推荐阅读更多精彩内容

  • 返沪第一天,想家,想回家。更想姐姐,她身上有很多正能量,让人感到有力量和希望。 从现在开始过好每天。定目标,做计划...
    青衣雨翼_shape阅读 123评论 0 0
  • 作业本一:思维空性 行脚的空性:我觉得行脚可以锻炼毅力,有的人觉得行脚太累,都是对的,当有观察者的时候,它可以有无...
    妙莲修行阅读 237评论 0 0
  • 每次逛贴吧的时候,我都会被迷妹们的热情给吓到。有每天打卡签到的,有公开表白“我爱你的”,更有甚者以爱豆为主角写小说...
    收藏回忆的宇航员阅读 289评论 2 2