Marking lots of stuff as :nodoc:
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
module Squib
|
||||
class Card
|
||||
|
||||
# :nodoc:
|
||||
# @api private
|
||||
def background(color)
|
||||
cc = cairo_context
|
||||
cc.set_source_color(color)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
module Squib
|
||||
class Card
|
||||
|
||||
# :nodoc:
|
||||
# @api private
|
||||
def png(file, x, y, alpha)
|
||||
cc = cairo_context
|
||||
png = Cairo::ImageSurface.from_png(file)
|
||||
@@ -8,6 +10,8 @@ module Squib
|
||||
cc.paint(alpha)
|
||||
end
|
||||
|
||||
# :nodoc:
|
||||
# @api private
|
||||
def svg(file, id, x, y, width, height)
|
||||
svg = RSVG::Handle.new_from_file(file)
|
||||
width = svg.width if width == :native
|
||||
|
||||
@@ -34,6 +34,7 @@ module Squib
|
||||
end
|
||||
end
|
||||
|
||||
# :nodoc:
|
||||
# @api private
|
||||
def trim(surface, trim, width, height)
|
||||
if trim > 0
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
module Squib
|
||||
class Card
|
||||
|
||||
# :nodoc:
|
||||
# @api private
|
||||
def save_png(i, dir, prefix)
|
||||
cairo_context.target.write_to_png("#{dir}/#{prefix}#{i}.png")
|
||||
end
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
module Squib
|
||||
class Card
|
||||
|
||||
# :nodoc:
|
||||
# @api private
|
||||
def rect(x, y, width, height, x_radius, y_radius, fill_color, stroke_color, stroke_width)
|
||||
cc = cairo_context
|
||||
cc.rounded_rectangle(x, y, width, height, x_radius, y_radius)
|
||||
|
||||
@@ -3,6 +3,8 @@ require 'pango'
|
||||
module Squib
|
||||
class Card
|
||||
|
||||
# :nodoc:
|
||||
# @api private
|
||||
def draw_text_hint(x,y,layout, color)
|
||||
return if color.nil? && @deck.text_hint.nil?
|
||||
color ||= @deck.text_hint
|
||||
@@ -14,6 +16,8 @@ module Squib
|
||||
rect(x,y,w,h,0,0,'#0000',color, 2.0)
|
||||
end
|
||||
|
||||
# :nodoc:
|
||||
# @api private
|
||||
def ellipsize(layout, options)
|
||||
unless options[:ellipsize].nil?
|
||||
h = { :none => Pango::Layout::ELLIPSIZE_NONE,
|
||||
@@ -28,6 +32,8 @@ module Squib
|
||||
layout
|
||||
end
|
||||
|
||||
# :nodoc:
|
||||
# @api private
|
||||
def wrap(layout, options)
|
||||
unless options[:wrap].nil?
|
||||
h = { :word => Pango::Layout::WRAP_WORD,
|
||||
@@ -42,6 +48,8 @@ module Squib
|
||||
layout
|
||||
end
|
||||
|
||||
# :nodoc:
|
||||
# @api private
|
||||
def align(layout, options)
|
||||
unless options[:align].nil?
|
||||
h = { :left => Pango::ALIGN_LEFT,
|
||||
@@ -53,6 +61,8 @@ module Squib
|
||||
layout
|
||||
end
|
||||
|
||||
# :nodoc:
|
||||
# @api private
|
||||
def valign(cc, layout, extents, x, y, valign)
|
||||
if layout.height > 0
|
||||
case valign
|
||||
@@ -64,12 +74,16 @@ module Squib
|
||||
end
|
||||
end
|
||||
|
||||
# :nodoc:
|
||||
# @api private
|
||||
def setwh(layout, options)
|
||||
layout.width = options[:width] * Pango::SCALE unless options[:width].nil? || options[:width] == :native
|
||||
layout.height = options[:height] * Pango::SCALE unless options[:height].nil? || options[:height] == :native
|
||||
layout
|
||||
end
|
||||
|
||||
# :nodoc:
|
||||
# @api private
|
||||
def text(str, font, x, y, color, options)
|
||||
cc = cairo_context
|
||||
cc.set_source_color(color)
|
||||
|
||||
Reference in New Issue
Block a user