showcase: trim_radius still defaults to 38px
docs reflect that now too
This commit is contained in:
@@ -14,6 +14,7 @@ Docs:
|
||||
* svg: document rasterization on mask (#192)
|
||||
* Document how to run the code (#186)
|
||||
* Document some ways of using `prefix` in `save_png` (#268)
|
||||
* `showcase` option `trim_radius` defaults to 38, not 0
|
||||
|
||||
Chores:
|
||||
* Bumped deps: Pango et al. to 3.3.6, Cairo to 1.16.4, Nokogiri to 1.10.3, Highline to 2.0.2
|
||||
|
||||
@@ -6,7 +6,15 @@ Renders a range of cards in a showcase as if they are sitting in 3D on a reflect
|
||||
Options
|
||||
-------
|
||||
|
||||
.. include:: /args/trim.rst
|
||||
trim
|
||||
default: ``0``
|
||||
|
||||
the margin around the card to trim before putting into the image
|
||||
|
||||
trim_radius
|
||||
default: ``38``
|
||||
|
||||
the rounded rectangle radius around the card to trim before putting into the image. Defaults to 1/8in rounded corners (38px).
|
||||
|
||||
scale
|
||||
default: ``0.8``
|
||||
|
||||
@@ -11,7 +11,10 @@ module Squib
|
||||
include DirValidator
|
||||
|
||||
def self.parameters
|
||||
{ scale: 0.85,
|
||||
{
|
||||
scale: 0.85,
|
||||
trim: 0,
|
||||
trim_radius: 38,
|
||||
offset: 1.1,
|
||||
reflect_offset: 15,
|
||||
reflect_percent: 0.25,
|
||||
|
||||
@@ -21,7 +21,7 @@ module Squib
|
||||
|
||||
cards = range.collect { |i| @cards[i] }
|
||||
cards.each_with_index do |card, i|
|
||||
trimmed = trim_rounded(card.cairo_surface, sheet.trim, sheet.trim_radius)
|
||||
trimmed = trim_rounded(card.cairo_surface, showcase.trim, showcase.trim_radius)
|
||||
reflected = reflect(trimmed, showcase.reflect_offset, showcase.reflect_percent, showcase.reflect_strength)
|
||||
perspectived = perspective(reflected, showcase.scale, showcase.face_right?)
|
||||
out_cc.set_source(perspectived, sheet.margin + i * perspectived.width * showcase.offset, sheet.margin)
|
||||
|
||||
Reference in New Issue
Block a user