Clarify cairo_access

This commit is contained in:
Andy Meneely
2014-11-24 09:52:12 -05:00
parent be5cccfd63
commit 4ab9b3f5d5
2 changed files with 16 additions and 5 deletions
+4 -3
View File
@@ -1,7 +1,7 @@
require 'squib'
Squib::Deck.new(cards: 2) do
background color: :white
# If you really need something custom-made, the underlying cairo context
# can be accessed directly via each Squib::Card
#
@@ -11,8 +11,9 @@ Squib::Deck.new(cards: 2) do
# I also recommend wrapping it in a Cairo save/restore, which Squib calls "use_cairo"
each do |card|
card.use_cairo do |cairo_context|
cairo_context.set_source_color(:white)
cairo_context.paint
cairo_context.set_source_color(:blue)
cairo_context.circle(150, 150, 150)
cairo_context.fill
end
end