-
Notifications
You must be signed in to change notification settings - Fork 53
OperatorBorder
Squeegy edited this page Sep 12, 2010
·
2 revisions
border(options = {})
Add a border to the outside of the image.
Use the following keys in the options
hash:
-
:size
Width of the border on each side. You can use a 2 dimensional value"5x10"
if you want different widths for the sides and top borders, but a single integer will apply the same border on all sides.
-
:color
The color of the border. Use an RMagick named color'red'
,color(r, g, b)
, or aMagick::Pixel
object.
@photo.operate do |image|
# Defaults
image.border(
:size => 10,
:color => 'white' # or color(255, 255, 255)
)
# Big, pink and wide
image.border(
:size => '200x100',
:color => color(255, 128, 128)
)
end