Sha256: 725870064c4fd168d992c03ecf598ec1f3370101c2fec78ae0105a7993c7f489
Contents?: true
Size: 967 Bytes
Versions: 2
Compression:
Stored size: 967 Bytes
Contents
require 'cairo' require 'squib/input_helpers' module Squib # Back end graphics. Private. class Card include Squib::InputHelpers # :nodoc: # @api private attr_reader :width, :height # :nodoc: # @api private attr_accessor :cairo_surface, :cairo_context # :nodoc: # @api private def initialize(deck, width, height) @deck=deck; @width=width; @height=height @cairo_surface = Cairo::ImageSurface.new(width,height) @cairo_context = Cairo::Context.new(@cairo_surface) end def use_cairo(&block) @cairo_context.save block.yield(@cairo_context) @cairo_context.restore end ######################## ### BACKEND GRAPHICS ### ######################## require 'squib/graphics/background' require 'squib/graphics/image' require 'squib/graphics/save_doc' require 'squib/graphics/save_images' require 'squib/graphics/shapes' require 'squib/graphics/text' end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
squib-0.0.6 | lib/squib/card.rb |
squib-0.0.5 | lib/squib/card.rb |