Yard: Add in lots of @api private directives
parent
9c5f78ee3b
commit
cb7ff5f4d7
|
|
@ -1,7 +1,11 @@
|
||||||
module Squib
|
module Squib
|
||||||
class TextEmbed
|
class TextEmbed
|
||||||
|
# :nodoc:
|
||||||
|
# @api private
|
||||||
attr_reader :rules
|
attr_reader :rules
|
||||||
|
|
||||||
|
# :nodoc:
|
||||||
|
# @api private
|
||||||
def initialize
|
def initialize
|
||||||
@rules = {} # store an array of options for later usage
|
@rules = {} # store an array of options for later usage
|
||||||
end
|
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 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 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}
|
# @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)
|
def svg(opts)
|
||||||
opts = Squib::SYSTEM_DEFAULTS.merge(opts)
|
opts = Squib::SYSTEM_DEFAULTS.merge(opts)
|
||||||
# TODO: add input validation here. We need the key for example.
|
# TODO: add input validation here. We need the key for example.
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,12 @@ require 'squib/constants'
|
||||||
|
|
||||||
module Squib
|
module Squib
|
||||||
module Args
|
module Args
|
||||||
|
# :nodoc:
|
||||||
|
# @api private
|
||||||
module UnitConversion
|
module UnitConversion
|
||||||
|
|
||||||
|
# :nodoc:
|
||||||
|
# @api private
|
||||||
module_function
|
module_function
|
||||||
def parse(arg, dpi=300)
|
def parse(arg, dpi=300)
|
||||||
case arg.to_s.rstrip
|
case arg.to_s.rstrip
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@ module Squib
|
||||||
@cairo_context.antialias = ANTIALIAS_OPTS[(@deck.antialias.downcase)] || 'subpixel'
|
@cairo_context.antialias = ANTIALIAS_OPTS[(@deck.antialias.downcase)] || 'subpixel'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# :nodoc:
|
||||||
|
# @api private
|
||||||
def make_surface(svgfile, backend)
|
def make_surface(svgfile, backend)
|
||||||
case backend
|
case backend
|
||||||
when :memory
|
when :memory
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,16 @@ require 'squib/graphics/gradient_regex'
|
||||||
|
|
||||||
module Squib
|
module Squib
|
||||||
module Graphics
|
module Graphics
|
||||||
|
# Wrapper class for the Cairo context. Private.
|
||||||
class CairoContextWrapper
|
class CairoContextWrapper
|
||||||
extend Forwardable
|
extend Forwardable
|
||||||
|
|
||||||
|
# :nodoc:
|
||||||
|
# @api private
|
||||||
attr_accessor :cairo_cxt
|
attr_accessor :cairo_cxt
|
||||||
|
|
||||||
|
# :nodoc:
|
||||||
|
# @api private
|
||||||
def initialize(cairo_cxt)
|
def initialize(cairo_cxt)
|
||||||
@cairo_cxt = cairo_cxt
|
@cairo_cxt = cairo_cxt
|
||||||
end
|
end
|
||||||
|
|
@ -18,6 +24,8 @@ module Squib
|
||||||
:operator=, :show_page, :clip, :transform, :mask, :create_pango_layout,
|
:operator=, :show_page, :clip, :transform, :mask, :create_pango_layout,
|
||||||
:antialias=
|
:antialias=
|
||||||
|
|
||||||
|
# :nodoc:
|
||||||
|
# @api private
|
||||||
def set_source_squibcolor(arg)
|
def set_source_squibcolor(arg)
|
||||||
if match = arg.match(LINEAR_GRADIENT)
|
if match = arg.match(LINEAR_GRADIENT)
|
||||||
x1, y1, x2, y2 = match.captures
|
x1, y1, x2, y2 = match.captures
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,8 @@ module Squib
|
||||||
return tmp_cc.target
|
return tmp_cc.target
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# :nodoc:
|
||||||
|
# @api private
|
||||||
def perspective(src, scale, face_right)
|
def perspective(src, scale, face_right)
|
||||||
dest_cxt = Cairo::Context.new(Cairo::ImageSurface.new(src.width * scale, src.height))
|
dest_cxt = Cairo::Context.new(Cairo::ImageSurface.new(src.width * scale, src.height))
|
||||||
in_thickness = 1 # Take strip 1 pixel-width at a time
|
in_thickness = 1 # Take strip 1 pixel-width at a time
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,8 @@ module Squib
|
||||||
layout
|
layout
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# :nodoc:
|
||||||
|
# @api private
|
||||||
def next_embed(keys, str)
|
def next_embed(keys, str)
|
||||||
ret = nil
|
ret = nil
|
||||||
ret_key = nil
|
ret_key = nil
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue