8 changed files with 287 additions and 5 deletions
@ -0,0 +1,85 @@ |
|||||||
|
#This layout inspired by popular fantasy games |
||||||
|
title: |
||||||
|
x: 90 |
||||||
|
y: 90 |
||||||
|
width: 635 |
||||||
|
height: 50 |
||||||
|
align: center |
||||||
|
|
||||||
|
art: |
||||||
|
x: 75 |
||||||
|
y: 150 |
||||||
|
width: 675 |
||||||
|
height: 520 |
||||||
|
|
||||||
|
description: |
||||||
|
x: 100 |
||||||
|
y: 675 |
||||||
|
width: 625 |
||||||
|
height: 275 |
||||||
|
valign: middle |
||||||
|
align: center |
||||||
|
font_size: 18 |
||||||
|
desc: # alias |
||||||
|
extends: description |
||||||
|
|
||||||
|
type: |
||||||
|
x: 90 |
||||||
|
y: 955 |
||||||
|
width: 645 |
||||||
|
height: 50 |
||||||
|
align: center |
||||||
|
|
||||||
|
lower_right: |
||||||
|
x: 675 |
||||||
|
y: 975 |
||||||
|
width: 75 |
||||||
|
height: 75 |
||||||
|
font_size: 18 |
||||||
|
valign: bottom |
||||||
|
align: right |
||||||
|
lr: #alias |
||||||
|
extends: lower_right |
||||||
|
|
||||||
|
lower_left: |
||||||
|
x: 75 |
||||||
|
y: 975 |
||||||
|
width: 75 |
||||||
|
height: 75 |
||||||
|
font_size: 18 |
||||||
|
valign: bottom |
||||||
|
align: left |
||||||
|
ll: # alias |
||||||
|
extends: lower_left |
||||||
|
|
||||||
|
copyright: |
||||||
|
x: 75 |
||||||
|
y: 1025 |
||||||
|
width: 675 |
||||||
|
height: 25 |
||||||
|
font_size: 16 |
||||||
|
align: center |
||||||
|
valign: bottom |
||||||
|
#aliases for copyright |
||||||
|
copy: |
||||||
|
extends: copyright |
||||||
|
credit: |
||||||
|
extends: copyright |
||||||
|
credits: |
||||||
|
extends: copyright |
||||||
|
|
||||||
|
# The "cut line", without rounded corners |
||||||
|
cut: |
||||||
|
x: 37.5 |
||||||
|
y: 37.5 |
||||||
|
width: 750 |
||||||
|
height: 1050 |
||||||
|
|
||||||
|
# The "safe zone" as defined by TheGameCrafter poker cards |
||||||
|
safe: |
||||||
|
x: 75 |
||||||
|
y: 75 |
||||||
|
width: 675 |
||||||
|
height: 975 |
||||||
|
radius: 16 |
||||||
|
dash: 3 3 |
||||||
@ -0,0 +1,101 @@ |
|||||||
|
#This layout inspired by popular fantasy games |
||||||
|
title: |
||||||
|
x: 90 |
||||||
|
y: 90 |
||||||
|
width: 500 |
||||||
|
height: 50 |
||||||
|
|
||||||
|
upper_right: |
||||||
|
x: 595 |
||||||
|
y: 90 |
||||||
|
width: 135 |
||||||
|
height: 50 |
||||||
|
align: right |
||||||
|
ur: # alias |
||||||
|
extends: upper_right |
||||||
|
|
||||||
|
art: |
||||||
|
x: 75 |
||||||
|
y: 150 |
||||||
|
width: 675 |
||||||
|
height: 520 |
||||||
|
|
||||||
|
type: |
||||||
|
x: 90 |
||||||
|
y: 675 |
||||||
|
width: 500 |
||||||
|
height: 50 |
||||||
|
|
||||||
|
type_right: |
||||||
|
x: 595 |
||||||
|
y: 675 |
||||||
|
width: 135 |
||||||
|
height: 50 |
||||||
|
align: right |
||||||
|
tr: #alias |
||||||
|
extends: type_right |
||||||
|
|
||||||
|
description: |
||||||
|
x: 100 |
||||||
|
y: 730 |
||||||
|
width: 625 |
||||||
|
height: 275 |
||||||
|
valign: middle |
||||||
|
align: center |
||||||
|
font_size: 18 |
||||||
|
desc: # alias |
||||||
|
extends: description |
||||||
|
|
||||||
|
lower_right: |
||||||
|
x: 675 |
||||||
|
y: 975 |
||||||
|
width: 75 |
||||||
|
height: 75 |
||||||
|
font_size: 18 |
||||||
|
valign: bottom |
||||||
|
align: right |
||||||
|
lr: #alias |
||||||
|
extends: lower_right |
||||||
|
|
||||||
|
lower_left: |
||||||
|
x: 75 |
||||||
|
y: 975 |
||||||
|
width: 75 |
||||||
|
height: 75 |
||||||
|
font_size: 18 |
||||||
|
valign: bottom |
||||||
|
align: left |
||||||
|
ll: # alias |
||||||
|
extends: lower_left |
||||||
|
|
||||||
|
copyright: |
||||||
|
x: 75 |
||||||
|
y: 1025 |
||||||
|
width: 675 |
||||||
|
height: 25 |
||||||
|
font_size: 16 |
||||||
|
align: center |
||||||
|
valign: bottom |
||||||
|
#aliases for copyright |
||||||
|
copy: |
||||||
|
extends: copyright |
||||||
|
credit: |
||||||
|
extends: copyright |
||||||
|
credits: |
||||||
|
extends: copyright |
||||||
|
|
||||||
|
# The "cut line", without rounded corners |
||||||
|
cut: |
||||||
|
x: 37.5 |
||||||
|
y: 37.5 |
||||||
|
width: 750 |
||||||
|
height: 1050 |
||||||
|
|
||||||
|
# The "safe zone" as defined by TheGameCrafter poker cards |
||||||
|
safe: |
||||||
|
x: 75 |
||||||
|
y: 75 |
||||||
|
width: 675 |
||||||
|
height: 975 |
||||||
|
radius: 16 |
||||||
|
dash: 3 3 |
||||||
@ -0,0 +1,6 @@ |
|||||||
|
require 'squib' |
||||||
|
|
||||||
|
Squib::Deck.new do |
||||||
|
circle color: 'black', fill_color: 'black' |
||||||
|
save_png prefix: 'color_shortcuts_' |
||||||
|
end |
||||||
@ -0,0 +1,52 @@ |
|||||||
|
require 'squib' |
||||||
|
|
||||||
|
# This sample demonstrates the built-in layouts for Squib. |
||||||
|
# Each card demonstrates a different built-in layout. |
||||||
|
Squib::Deck.new(layout: 'fantasy.yml') do |
||||||
|
background color: 'white' |
||||||
|
|
||||||
|
set font: 'Times New Roman,Serif 32' |
||||||
|
hint text: '#333' # show extents of text boxes to demo the layout |
||||||
|
|
||||||
|
text str: 'fantasy.yml', layout: :title |
||||||
|
text str: 'ur', layout: :upper_right |
||||||
|
text str: 'art', layout: :art |
||||||
|
text str: 'type', layout: :type |
||||||
|
text str: 'tr', layout: :type_right |
||||||
|
text str: 'description', layout: :description |
||||||
|
text str: 'lr', layout: :lower_right |
||||||
|
text str: 'll', layout: :lower_left |
||||||
|
text str: 'credits', layout: :copy |
||||||
|
|
||||||
|
rect layout: :safe |
||||||
|
rect layout: :cut |
||||||
|
save_png prefix: 'layouts_builtin_fantasy_' |
||||||
|
end |
||||||
|
|
||||||
|
Squib::Deck.new(layout: 'economy.yml') do |
||||||
|
background color: 'white' |
||||||
|
|
||||||
|
set font: 'Times New Roman,Serif 32' |
||||||
|
hint text: '#333' # show extents of text boxes to demo the layout |
||||||
|
|
||||||
|
text str: 'economy.yml', layout: :title |
||||||
|
text str: 'art', layout: :art |
||||||
|
text str: 'description', layout: :description |
||||||
|
text str: 'type', layout: :type |
||||||
|
text str: 'lr', layout: :lower_right |
||||||
|
text str: 'll', layout: :lower_left |
||||||
|
text str: 'credits', layout: :copy |
||||||
|
|
||||||
|
rect layout: :safe |
||||||
|
rect layout: :cut |
||||||
|
save_png prefix: 'layouts_builtin_economy_' |
||||||
|
end |
||||||
|
|
||||||
|
# Stitch together a deck of all the above examples |
||||||
|
Squib::Deck.new(cards: 2) do |
||||||
|
puts Dir.glob('_output/layouts_builtin_*.png') |
||||||
|
Dir.glob('_output/layouts_builtin_*.png').each.with_index do |file, i| |
||||||
|
png file: file, range: i |
||||||
|
end |
||||||
|
save_sheet prefix: 'layouts_builtinsheet_' |
||||||
|
end |
||||||
Loading…
Reference in new issue