简体   繁体   中英

Transparent Background in Ruby Squib

I'm using Squib to create an easier workflow for creating new cards for a game I'm making. Everything is working great however the image for the card back I'm using has rounded corners. This leads to a kind of "dead area" between the rounded part of the card image and the corner of the actual outputted (?) image. There is an option to make this a specific color, however I was wondering if there is any way to make it completely transparent. The docs don't mention anything about an alpha value. I could work around it by making my card image completely rectangular, however I really want to avoid that because it makes the cards look much different than I intend.

As of v0.9, the save_png method supports a trim and trim_radius option so you can render some real-life looking cards but still maintain a bleed region around the edges of your cards.

Also, the background color of a Squib card by default is empty. Maybe just remove the background color: call for the card backs?

(Full disclosure: I'm the developer of Squib)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM