编程语言/photoshop/导出格式:修订间差异

来自康健生活
Kangkk​(留言 | 贡献)
Kangkk​(留言 | 贡献)
第29行: 第29行:
{| class="wikitable"
{| class="wikitable"
|-
|-
! 属性 !! 描述 !! eq
! 属性 !! 描述 !! eq !! info
|-
|-
| impliedFontSize || 隐含/默认字体大小 || <syntaxhighlight lang="javascript">{
| impliedFontSize || 隐含/默认字体大小 || <syntaxhighlight lang="javascript">{
   "value": 36,
   "value": 36,
   "units": "pointsUnit"
   "units": "pointsUnit"
}</syntaxhighlight>
}</syntaxhighlight> || 导出的时候首选 impliedFontSize 作为字体大小的标尺
|-
|-
| size || 字体大小 || <syntaxhighlight lang="javascript">{
| size || 字体大小 || <syntaxhighlight lang="javascript">{
   "value": 27.0473,
   "value": 27.0473,
   "units": "pointsUnit"
   "units": "pointsUnit"
}</syntaxhighlight>
}</syntaxhighlight> || 当 impliedFontSize 变化的时候,size 跟随一起改变,如:<code>impliedFontSize 36</code>、<code>size 27.0473</code>,<code>impliedFontSize 14</code>、<code>size 10.5184</code>。比例约为 <code>1.33100</code>
|}
|}



2022年3月15日 (二) 11:10的版本

引言

源

属性 描述 eq
bounds 长宽
{
  "top": 382,
  "left": 1125,
  "bottom": 417,
  "right": 1295
}
boundsWithFX 效果-描边
{
  "top": 379,
  "left": 1122,
  "bottom": 420,
  "right": 1298
}
示例 示例 示例

layerEffects

text

textStyleRange

textStyle
属性 描述 eq info
impliedFontSize 隐含/默认字体大小
{
  "value": 36,
  "units": "pointsUnit"
}
导出的时候首选 impliedFontSize 作为字体大小的标尺
size 字体大小
{
  "value": 27.0473,
  "units": "pointsUnit"
}
当 impliedFontSize 变化的时候,size 跟随一起改变,如:impliedFontSize 36、size 27.0473,impliedFontSize 14、size 10.5184。比例约为 1.33100

导出格式

const cssTemp = {
  backgrounds: [
    {
      color: {
        r: 216,
        g: 216,
        b: 216,
        a: 1,
      },
    },
  ],
  x: 244,
  y: 222,
  width: 20,
  height: 13,
  borders: [
    {
      color: {
        r: 151,
        g: 151,
        b: 151,
        a: 1,
      },
      width: 1,
    },
  ],
  boxShadows: [],
  borderRadius: 0,
  opacity: 0,
  fontFamily: 'PingFang SC',
  fontSize: 12,
  color: {
    r: 27,
    g: 36,
    b: 50,
    a: 1,
  },
  content: '财务复审待办',
  textAlign: 'left',
  letterSpacing: 0,
  lineHeight: 17,
  exportable: true,
  exportOptions: [],
}