使用 Squib 生成风景卡片

Generating landscape cards with Squib

如何制作风景卡?

这是套牌:

Squib::Deck.new(cards: 1, layout: 'layouts/landscape.yml') do
  background color: 'white'

  rect layout: 'cut'
  rect layout: 'safe'

  save format: :png, prefix: 'landscape_'
end

布局:

cut:
  x: 37.5
  y: 37.5
  width: 1050
  height: 750

safe:
  x: 75
  y: 75
  width: 975
  height: 675
  radius: 16
  dash: 3 3

输出出现中断:

您需要使用 Squib::Deck.new 函数的宽度和高度选项。

http://squib.readthedocs.io/en/v0.14.0/dsl/deck.html

Squib::Deck.new(cards: 1, width: 1125, height: 825, layout: 'layouts/landscape.yml') do
  background color: 'white'

  rect layout: 'cut'
  rect layout: 'safe'

  save format: :png, prefix: 'landscape_'
end