Browse Source

Yard: Add in lots of @api private directives

dev
Andy Meneely 11 years ago
parent
commit
cb7ff5f4d7
  1. 5
      lib/squib/api/text_embed.rb
  2. 4
      lib/squib/args/unit_conversion.rb
  3. 2
      lib/squib/card.rb
  4. 8
      lib/squib/graphics/cairo_context_wrapper.rb
  5. 2
      lib/squib/graphics/showcase.rb
  6. 2
      lib/squib/graphics/text.rb

5
lib/squib/api/text_embed.rb

@ -1,7 +1,11 @@
module Squib
class TextEmbed
# :nodoc:
# @api private
attr_reader :rules
# :nodoc:
# @api private
def initialize
@rules = {} # store an array of options for later usage
end
@ -17,6 +21,7 @@ module Squib
# @option opts alpha [Decimal] (1.0) the alpha-transparency percentage used to blend this image. Supports Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion}
# @option opts blend [:none, :multiply, :screen, :overlay, :darken, :lighten, :color_dodge, :color_burn, :hard_light, :soft_light, :difference, :exclusion, :hsl_hue, :hsl_saturation, :hsl_color, :hsl_luminosity] (:none) the composite blend operator used when applying this image. See Blend Modes at http://cairographics.org/operators. Supports Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion}
# @option opts angle [FixNum] (0) Rotation of the in radians. Note that this rotates around the upper-left corner, making the placement of x-y coordinates slightly tricky. Supports Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion}
# @api public
def svg(opts)
opts = Squib::SYSTEM_DEFAULTS.merge(opts)
# TODO: add input validation here. We need the key for example.

4
lib/squib/args/unit_conversion.rb

@ -2,8 +2,12 @@ require 'squib/constants'
module Squib
module Args
# :nodoc:
# @api private
module UnitConversion
# :nodoc:
# @api private
module_function
def parse(arg, dpi=300)
case arg.to_s.rstrip

2
lib/squib/card.rb

@ -27,6 +27,8 @@ module Squib
@cairo_context.antialias = ANTIALIAS_OPTS[(@deck.antialias.downcase)] || 'subpixel'
end
# :nodoc:
# @api private
def make_surface(svgfile, backend)
case backend
when :memory

8
lib/squib/graphics/cairo_context_wrapper.rb

@ -3,10 +3,16 @@ require 'squib/graphics/gradient_regex'
module Squib
module Graphics
# Wrapper class for the Cairo context. Private.
class CairoContextWrapper
extend Forwardable
# :nodoc:
# @api private
attr_accessor :cairo_cxt
# :nodoc:
# @api private
def initialize(cairo_cxt)
@cairo_cxt = cairo_cxt
end
@ -18,6 +24,8 @@ module Squib
:operator=, :show_page, :clip, :transform, :mask, :create_pango_layout,
:antialias=
# :nodoc:
# @api private
def set_source_squibcolor(arg)
if match = arg.match(LINEAR_GRADIENT)
x1, y1, x2, y2 = match.captures

2
lib/squib/graphics/showcase.rb

@ -60,6 +60,8 @@ module Squib
return tmp_cc.target
end
# :nodoc:
# @api private
def perspective(src, scale, face_right)
dest_cxt = Cairo::Context.new(Cairo::ImageSurface.new(src.width * scale, src.height))
in_thickness = 1 # Take strip 1 pixel-width at a time

2
lib/squib/graphics/text.rb

@ -82,6 +82,8 @@ module Squib
layout
end
# :nodoc:
# @api private
def next_embed(keys, str)
ret = nil
ret_key = nil

Loading…
Cancel
Save