qgraphicsview 添加矩形框并拖动改变大小_【Sketch最新文档】2.4-Resizing Layers(重置大小)...

e276267d02092c7c57f24c559bf6d74a.png

Resizing Layers
重置大小

The eight handles don’t just indicate selection; you can also use them to resize a layer. Grab any of the handles and drag them to resize layer. If you also hold down the Shift key it will resize the layer proportionally; keeping width and height at the same ratio.
八个操作手柄不仅表示图层已被选中;你也可以使用它们对图层的大小进行重置。你可以拖动任何一个手柄来调整图层尺寸。如果你同时按住Shift键,图层的会按照比例变化。保持宽度和高度的比例不变。

41c9caaf894820b6fbcb5431c2a159d1.gif


To resize just the width or height of a layer, grab the resize handles on the sides of the layer,to resize in both dimensions, use the corners. As you resize, you will notice the width and height measurements shown besides the pointer.
要仅调整图层的宽度或者高度,可以控制图层边上的手柄进行操作。要同时调整宽高的话,操作角上的手柄。随着你拖动手柄,你会发现在鼠标指针旁边会实时显示当前的宽度和高度值。

If you hold down the Option key, the layer will resize from the middle instead of from the opposite edge:
如果你按住Option键,当你拖动一边的手柄时,图层会向两边同时调整而不是只调整一边:

e75e2acde221693a02894b73f2d17039.gif


Resizing Using the Inspector
使用检查器调整大小

You can also select a layer and type its new dimensions in the Inspector. If the size lock icon is closed , its proportions will be maintained when scaling. Also, you can use these shortcuts to resize from an anchor point other than the top-left corner:
你也可以选择需要调整的图层,在检查器面板中输入新的参数。如果尺寸锁形按钮是锁定的,那么当调整图形大小的时候宽高会保持原有的比例。你也可以在面板中的参数后面添加下面的快捷键从左上角意外的锚点调整大小。

5bdd6bb87999ddd7a03d93dd70ce7311.png


So, to scale a layer so that it’s 50 pixels wide, from the right, you’d set its width to 50r.
因此,要从右边将图层的宽度缩放为50像素的话,你可以在检查器中将宽度的参数设置为50r。

Keyboard
键盘

You can also resize layers using the keyboard. For very pixel-precise adjustments, this is usually easier than using the mouse. To do so, hold down the Command key and use the arrow keys on the keyboard. Command-Right Arrow will increase the width of the layer by 1 px just as Command-Left Arrow will decrease it by one.Similarly, Command-Down Arrow and Command-Up Arrow will increase and decrease the height by 1 px respectively. Holding down the Shift key at this time changes the 1 px increment to 10 px instead.
你也可以使用键盘来调整图层尺寸。对于非常精准的像素调整,键盘控制比鼠标控制更容易些。为此,你需要按住Command键并且同时操作键盘上的方向键。Command+右箭头键可以将图层的宽度增加1PX,Command+左箭头就会将宽度减1PX。同样Command+向上箭头和Command+向下箭头分别将高度增加和减少1PX。如果同时也按住Shift键改变的步长就从1PX增加到10PX。

You can also take a look of how to use math operators in the Inspector to help speed up your workflow.
你还可以查看如何在检查器中使用数学运算来帮你加快工作流程。

Scaling
大小缩放

When you resize a layer, its stylistic elements will not scale up or down accordingly; a 5 px stroke on a 50 × 50 shape will stay a 5 px stroke when the layer is resized to150 × 150. To resize a layer and its properties (corner radius, border thickness, shadow size, etc.) all in one go, choose Layer › Transform ›Scale… from the menu (or press Command-K). Symbols can also be scaled using the Scale command.
当你调整图层大小时,它们的属性样式不会相应的调整。比如,一个50*50的矩形有一个5PX的描边,当把尺寸调整到150*150时它的描边依旧会是5PX。为了能将图层和它的属性(圆角半径,线框大小和阴影大小等)一并调整,那就在菜单中选择“图层(Layer)>变换(Transform)缩放…(Scale…)”(或者使用快捷键Command+K)。也可以使用缩放命令缩放符号。

671aa7f28cf6560e3fda8d42284274ab.png

Scaling layers is ideal when you want to adjust the sizeof an icon.
当你想要调整icon(图标)大小时,缩放图层时理想的选择。

When scaling layers in Sketch, you can set the origin from where your layer will resize. Its default is to scale from the center, but defining any one of the nine available origins can remove the step afterwards where you may want to reposition that layer.
在Sketch中缩放图层大小时,你可以设置图层缩放的原点。默认是从图层中心缩放。Sketch会保留上一次缩放时所选择的原点,所以每次缩放时你需要从九个原点中选择一个自己想要的。

58c08ad7153d7ee216fac847e3c122f0.png


Defining the Scale origin can be a huge timesaver.
定义好缩放原点可以节省大量时间。

For more advanced resizing options, to determine how layers inside groups or Art boards should behave when they’re resized, continue to the next chapter: Resizing Constraints.
更多高级调整尺寸的方法,可以设置组或者画板的尺寸调整时,其中的图层应该如何变换。下一章节我们会详细讲解:调整的约束

Last modified on Oct 02, 2018
最后一次修订于2018年10月02日

更多内容请关注公众号——“one点设计”,点击“设计翻译”>“Sketch最新文档”查阅,会陆续上传全部文档,希望该文档能够帮助到大家。
由于个人水平有限,如翻译中有什么问题,还请指正。如果你也有兴趣翻译设计文档可以和小编联系,欢迎大家多多交流。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值