使用Squib生成横向卡片

时间:2018-05-25 06:22:31

标签: 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

输出显示为中断: Example output

1 个答案:

答案 0 :(得分:1)

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

Calling Methods document

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