Module: Magick::RVG::Stylable

### Home Classes Methods

### In Files

- lib/rvg/stylable.rb

### Methods

- ::new
- #styles

### Files

- MANIFEST
- Makefile

### Class/Module Index

Quicksearch

- Magick
- Magick::DestroyedImageError
- Magick::Draw
- Magick::Enum
- Magick::FatalImageMagickError
- Magick::Geometry
- Magick::GeometryValue
- Magick::GradientFill
- Magick::HatchFill
- Magick::IPTC
- Magick::IPTC::Application
- Magick::IPTC::Envelope
- Magick::IPTC::ObjectData
- Magick::IPTC::Post_ObjectData_Descriptor
- Magick::IPTC::Pre_ObjectData_Descriptor
- Magick::Image
- Magick::Image::DrawOptions
- Magick::Image::Info
- Magick::Image::PolaroidOptions
- Magick::Image::View
- Magick::Image::View::Pixels
- Magick::Image::View::Rows
- Magick::ImageList
- Magick::ImageList::Montage
- Magick::ImageMagickError
- Magick::OptionalMethodArguments
- Magick::Pixel
- Magick::RVG
- Magick::RVG::Circle
- Magick::RVG::ClipPath
- Magick::RVG::Describable
- Magick::RVG::Duplicatable
- Magick::RVG::Ellipse
- Magick::RVG::Embellishable
- Magick::RVG::Group
- Magick::RVG::Image
- Magick::RVG::ImageConstructors
- Magick::RVG::Line
- Magick::RVG::Path
- Magick::RVG::PathData
- Magick::RVG::Pattern
- Magick::RVG::PolyShape
- Magick::RVG::Polygon
- Magick::RVG::Polyline
- Magick::RVG::PreserveAspectRatio
- Magick::RVG::Rect
- Magick::RVG::ShapeConstructors
- Magick::RVG::Stretchable
- Magick::RVG::StructureConstructors
- Magick::RVG::Stylable
- Magick::RVG::Text
- Magick::RVG::TextBase
- Magick::RVG::TextConstructors
- Magick::RVG::Transformable
- Magick::RVG::Use
- Magick::RVG::UseConstructors
- Magick::RVG::Utility
- Magick::RVG::Utility::DefaultTextStrategy
- Magick::RVG::Utility::GraphicContext
- Magick::RVG::Utility::LRTextStrategy
- Magick::RVG::Utility::RLTextStrategy
- Magick::RVG::Utility::TBTextStrategy
- Magick::RVG::Utility::TextAttributes
- Magick::RVG::Utility::TextStrategy
- Magick::TextureFill
- Object

No matching classes.

# Magick::RVG::Stylable

This module is mixed into classes that can have styles.

### Public Class Methods

new() click to toggle source

    # File lib/rvg/stylable.rb, line 73
    def initialize
        super
        @styles = Styles.new
    end

### Public Instance Methods

styles(styles) click to toggle source

This method can be used with any RVG, Group, Use, Text, or shape object. The argument is a hash. The style names are the hash keys. The style names and values are:

:baseline_shift

  modify the text baseline

:clip_path

  clipping path defined by clip_path

:clip_rule

  'evenodd' or 'nozero'

:fill

  color name

:fill_opacity

  the fill opacity, 0.0<=N<=1.0

:fill_rule

  'evenodd' or 'nozero'

:font

  font name or font file name

:font_family

  font family name, ex. 'serif'

:font_size

  font size in points

:font_stretch

  'normal','ultra_condensed','extra_condensed', 'condensed','semi_condensed','semi_expanded', 'expanded','extra_expanded','ultra_expanded'

:font_style

  'normal','italic','oblique'

:font_weight

  'normal','bold','bolder','lighter', or a multiple of 100 between 100 and 900.

:glyph_orientation_horizontal

  0, 90, 180, 270

:glyph_orientation_vertical

  0, 90, 180, 270

:letter_spacing

  modify the spacing between letters

:opacity

  both fill and stroke opacity, 0.0<=N<=1.0

:stroke

  color name

:stroke_dasharray

  dash pattern (Array)

:stroke_dashoffset

  initial distance into dash pattern

:stroke_linecap

  'butt', 'round', 'square'

:stroke_linejoin

  'miter', 'round', 'bevel'

:stroke_miterlimit

  miter length constraint

:stroke_opacity

  the stroke opacity, 0.0<=N<=1.0

:stroke_width

  stroke width

:text_anchor

  'start','middle','end'

:text_decoration

  'none','underline','overline','line_through'

:word_spacing

  modify the spacing between words

:writing_mode

  'lr-tb', 'lr', 'rt-tb', 'rl', 'tb-rl', 'tb'

    # File lib/rvg/stylable.rb, line 114
    def styles(styles)
        @styles.set(styles)
        yield(self) if block_given?
        self
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.