### Home Classes Methods

### In Files

- lib/rabbit/renderer/kernel.rb

### Methods

- #draw_background
- #draw_circle
- #draw_circle_by_radius
- #draw_cone
- #draw_cube
- #draw_dodecahedron
- #draw_flag
- #draw_flag_layout
- #draw_icosahedron
- #draw_octahedron
- #draw_rectangle_flag
- #draw_slide
- #draw_sphere
- #draw_teapot
- #draw_tetrahedron
- #draw_torus
- #draw_triangle_flag
- #flag_size
- #gl_call_list
- #gl_compile
- #gl_supported?
- #make_color
- #new_list_id
- #poppler_available?
- #reflect_context
- #restore_context
- #rotate_context
- #rsvg_available?
- #save_context
- #scale_context
- #shear_context
- #translate_context
- #z_far
- #z_view

### Class/Module Index

Quicksearch

- Rabbit
- Rabbit::AAFigureCanNotHandleError
- Rabbit::Action
- Rabbit::ApplyFinish
- Rabbit::AuthorConfiguration
- Rabbit::BlockDiagCanNotHandleError
- Rabbit::CantAllocateColorError
- Rabbit::CantFindHTMLTemplate
- Rabbit::CantFindThemeRDTemplate
- Rabbit::Canvas
- Rabbit::Command
- Rabbit::Command::Rabbit
- Rabbit::Command::RabbitSlide
- Rabbit::Command::RabbitTheme
- Rabbit::Config
- Rabbit::Console
- Rabbit::Converter
- Rabbit::CursorManager
- Rabbit::DependencyCanvas
- Rabbit::DiaCanNotHandleError
- Rabbit::DirtyCount
- Rabbit::EPSCanNotHandleError
- Rabbit::Element
- Rabbit::Element::Author
- Rabbit::Element::Base
- Rabbit::Element::Base::DrawHook
- Rabbit::Element::BlockElement
- Rabbit::Element::BlockHorizontalCentering
- Rabbit::Element::BlockQuote
- Rabbit::Element::Body
- Rabbit::Element::ClassName
- Rabbit::Element::Code
- Rabbit::Element::Comment
- Rabbit::Element::Container
- Rabbit::Element::ContainerElement
- Rabbit::Element::ContentSource
- Rabbit::Element::CustomTag
- Rabbit::Element::Date
- Rabbit::Element::DeletedText
- Rabbit::Element::DescriptionContent
- Rabbit::Element::DescriptionList
- Rabbit::Element::DescriptionListItem
- Rabbit::Element::DescriptionTerm
- Rabbit::Element::Emphasis
- Rabbit::Element::EnumList
- Rabbit::Element::EnumListItem
- Rabbit::Element::FootText
- Rabbit::Element::FootTextBlock
- Rabbit::Element::Footnote
- Rabbit::Element::HeadLine
- Rabbit::Element::Image
- Rabbit::Element::ImageTitleSlide
- Rabbit::Element::Index
- Rabbit::Element::IndexSlide
- Rabbit::Element::IndexThumbnail
- Rabbit::Element::IndexThumbnailRow
- Rabbit::Element::Institution
- Rabbit::Element::ItemList
- Rabbit::Element::ItemListItem
- Rabbit::Element::Keyboard
- Rabbit::Element::Keyword
- Rabbit::Element::MethodDescription
- Rabbit::Element::MethodKind
- Rabbit::Element::MethodList
- Rabbit::Element::MethodListItem
- Rabbit::Element::MethodName
- Rabbit::Element::MethodTerm
- Rabbit::Element::Note
- Rabbit::Element::Paragraph
- Rabbit::Element::Place
- Rabbit::Element::PopplerPage
- Rabbit::Element::PopplerSlide
- Rabbit::Element::PopplerTitleSlide
- Rabbit::Element::PreformattedBlock
- Rabbit::Element::PreformattedText
- Rabbit::Element::ReferText
- Rabbit::Element::Slide
- Rabbit::Element::SlideElement
- Rabbit::Element::Subscript
- Rabbit::Element::Subtitle
- Rabbit::Element::Superscript
- Rabbit::Element::SyntaxHighlightingBlock
- Rabbit::Element::SyntaxHighlightingText
- Rabbit::Element::Table
- Rabbit::Element::TableBody
- Rabbit::Element::TableCell
- Rabbit::Element::TableHead
- Rabbit::Element::TableHeader
- Rabbit::Element::TableRow
- Rabbit::Element::Text
- Rabbit::Element::TextBlock
- Rabbit::Element::TextBlockElement
- Rabbit::Element::TextContainer
- Rabbit::Element::TextContainerElement
- Rabbit::Element::TextElement
- Rabbit::Element::TextRenderer
- Rabbit::Element::Title
- Rabbit::Element::TitleSlide
- Rabbit::Element::Variable
- Rabbit::Element::Verbatim
- Rabbit::Element::Video
- Rabbit::Element::WaitBlock
- Rabbit::Element::WaitTag
- Rabbit::Element::When
- Rabbit::Element::Where
- Rabbit::EmbedFrame
- Rabbit::Error
- Rabbit::Format
- Rabbit::Format::ConvenienceTextFormatter
- Rabbit::Format::Foreground
- Rabbit::Format::Formatter
- Rabbit::Format::Size
- Rabbit::Format::SpanTextFormatter
- Rabbit::Format::ValueContainerFormatter
- Rabbit::Frame
- Rabbit::Front
- Rabbit::Front::PublicLevel
- Rabbit::GIMPCanNotHandleError
- Rabbit::GemBuilder
- Rabbit::GemFinder
- Rabbit::Gesture
- Rabbit::Gesture::Handler
- Rabbit::Gesture::Processor
- Rabbit::GetText
- Rabbit::Graffiti
- Rabbit::Graffiti::ConfigDialog
- Rabbit::Graffiti::Processor
- Rabbit::HTML
- Rabbit::HTML::Generator
- Rabbit::ImageFileDoesNotExistError
- Rabbit::ImageLoadError
- Rabbit::ImageLoadWithExternalCommandError
- Rabbit::ImageLoader
- Rabbit::ImageManipulable
- Rabbit::ImageManipulable::Base
- Rabbit::ImageManipulable::Default
- Rabbit::ImageManipulable::Dia
- Rabbit::ImageManipulable::EPS
- Rabbit::ImageManipulable::GIMP
- Rabbit::ImageManipulable::PDF
- Rabbit::ImageManipulable::SVG
- Rabbit::ImmutableSourceTypeError
- Rabbit::InfoWindow
- Rabbit::InvalidImageSizeError
- Rabbit::InvalidMotionError
- Rabbit::Keys
- Rabbit::Keys::Alt
- Rabbit::Keys::Control
- Rabbit::Keys::Shift
- Rabbit::Logger
- Rabbit::Logger::Base
- Rabbit::Logger::GUI
- Rabbit::Logger::STDERR
- Rabbit::Logger::Severity
- Rabbit::Menu
- Rabbit::ModuleLoader
- Rabbit::NoPrintSupportError
- Rabbit::NotAvailableInterfaceError
- Rabbit::NotExistError
- Rabbit::NotFileError
- Rabbit::NotReadableError
- Rabbit::NullFrame
- Rabbit::ParseError
- Rabbit::ParseFinish
- Rabbit::Parser
- Rabbit::Parser::Base
- Rabbit::Parser::Ext
- Rabbit::Parser::Ext::AAFigure
- Rabbit::Parser::Ext::BlockDiag
- Rabbit::Parser::Ext::CodeRay
- Rabbit::Parser::Ext::CodeRay::RabbitEncoder
- Rabbit::Parser::Ext::Emacs
- Rabbit::Parser::Ext::Enscript
- Rabbit::Parser::Ext::Entity
- Rabbit::Parser::Ext::Escape
- Rabbit::Parser::Ext::Image
- Rabbit::Parser::Ext::Image::Private
- Rabbit::Parser::Ext::Inline
- Rabbit::Parser::Ext::TeX
- Rabbit::Parser::Ext::Video
- Rabbit::Parser::Image
- Rabbit::Parser::Markdown
- Rabbit::Parser::Markdown::Converter
- Rabbit::Parser::NoteSetter
- Rabbit::Parser::PDF
- Rabbit::Parser::PauseSupport
- Rabbit::Parser::RD
- Rabbit::Parser::RD::Ext
- Rabbit::Parser::RD::Ext::Base
- Rabbit::Parser::RD::Ext::BlockVerbatim
- Rabbit::Parser::RD::Ext::CharacterReference
- Rabbit::Parser::RD::Ext::Image
- Rabbit::Parser::RD::Ext::InlineVerbatim
- Rabbit::Parser::RD::Ext::Refer
- Rabbit::Parser::RD::Ext::Video
- Rabbit::Parser::RD::RD2RabbitVisitor
- Rabbit::Parser::RD::Visitor
- Rabbit::Parser::SlidePropertySetter
- Rabbit::Parser::Wiki
- Rabbit::Parser::Wiki::RabbitOutput
- Rabbit::Parser::Wiki::RabbitOutput::BlockPlugin
- Rabbit::Parser::Wiki::RabbitOutput::InlinePlugin
- Rabbit::Parser::Wiki::RabbitOutput::InlinePlugin::Private
- Rabbit::PathManipulatable
- Rabbit::Progress
- Rabbit::READMEParser
- Rabbit::RT2RabbitVisitor
- Rabbit::Renderer
- Rabbit::Renderer::Base
- Rabbit::Renderer::Color
- Rabbit::Renderer::Display
- Rabbit::Renderer::Display::Base
- Rabbit::Renderer::Display::ButtonHandler
- Rabbit::Renderer::Display::ClutterEmbed
- Rabbit::Renderer::Display::Cursor
- Rabbit::Renderer::Display::DrawingArea
- Rabbit::Renderer::Display::DrawingAreaBase
- Rabbit::Renderer::Display::DrawingAreaPrimitive
- Rabbit::Renderer::Display::DrawingAreaViewOnly
- Rabbit::Renderer::Display::GL
- Rabbit::Renderer::Display::Gesture
- Rabbit::Renderer::Display::Graffiti
- Rabbit::Renderer::Display::HookHandler
- Rabbit::Renderer::Display::Info
- Rabbit::Renderer::Display::KeyHandler
- Rabbit::Renderer::Display::Magnifier
- Rabbit::Renderer::Display::Mask
- Rabbit::Renderer::Display::Menu
- Rabbit::Renderer::Display::Progress
- Rabbit::Renderer::Display::ScrollHandler
- Rabbit::Renderer::Display::Search
- Rabbit::Renderer::Display::Spotlight
- Rabbit::Renderer::Engine
- Rabbit::Renderer::Engine::Cairo
- Rabbit::Renderer::Engine::GDK
- Rabbit::Renderer::GL
- Rabbit::Renderer::Kernel
- Rabbit::Renderer::Pixmap
- Rabbit::Renderer::Pixmap::Base
- Rabbit::Renderer::Pixmap::Cairo
- Rabbit::Renderer::Pixmap::GDK
- Rabbit::Renderer::Pixmap::GL
- Rabbit::Renderer::Print
- Rabbit::Renderer::Print::Base
- Rabbit::Renderer::Print::Cairo
- Rabbit::Renderer::Print::Layout2
- Rabbit::Renderer::Print::LayoutBase
- Rabbit::Renderer::Print::LayoutMore
- Rabbit::Renderer::Print::Multiple
- Rabbit::SOAP
- Rabbit::SOAP::Driver
- Rabbit::SOAP::Server
- Rabbit::ScreenInfo
- Rabbit::SearchWindow
- Rabbit::Searcher
- Rabbit::SlideConfiguration
- Rabbit::Source
- Rabbit::Source::ARGF
- Rabbit::Source::Base
- Rabbit::Source::File
- Rabbit::Source::Hiki
- Rabbit::Source::LimitAccessInterval
- Rabbit::Source::Memory
- Rabbit::Source::SlideShare
- Rabbit::Source::URI
- Rabbit::SourceGenerator
- Rabbit::SourceGenerator::Hiki
- Rabbit::SourceGenerator::Markdown
- Rabbit::SourceGenerator::RD
- Rabbit::SourceUnreadableError
- Rabbit::Stock
- Rabbit::SystemRunner
- Rabbit::Task
- Rabbit::Task::Slide
- Rabbit::Task::SlideShare
- Rabbit::Task::SlideShare::Error
- Rabbit::Task::Theme
- Rabbit::TeXCanNotHandleError
- Rabbit::TemporaryFile
- Rabbit::Theme
- Rabbit::Theme::Applier
- Rabbit::Theme::DirectoryEntry
- Rabbit::Theme::ElementContainer
- Rabbit::Theme::Entry
- Rabbit::Theme::FileEntry
- Rabbit::Theme::GemEntry
- Rabbit::Theme::ImageDirectoryEntry
- Rabbit::Theme::ImageFileEntry
- Rabbit::Theme::ImageGemEntry
- Rabbit::Theme::Manager
- Rabbit::Theme::Searcher
- Rabbit::ThemeConfiguration
- Rabbit::ThemeExit
- Rabbit::TrackBall
- Rabbit::TrackBall::Vector
- Rabbit::UnknownCursorTypeError
- Rabbit::UnknownPropertyError
- Rabbit::UnsupportedFormatError
- Rabbit::Utils
- Rabbit::VideoWindow
- Rabbit::VideoWindow::VideoWidget
- Rabbit::XMLRPC
- Rabbit::XMLRPC::Client
- Rabbit::XMLRPC::Server
- Rabbit::XMLRPC::Servlet
- OptionParser
- OptionParser::Category
- OptionParser::List
- OptionParser::Switch
- Cairo
- Cairo::Context
- Gtk
- Gtk::Action
- Pango
- Pango::Context
- Object

No matching classes.

# Rabbit::Renderer::Kernel

### Public Instance Methods

draw_background(slide) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 61
    def draw_background(slide)
      draw_rectangle(true, 0, 0, width, height, @background)
    end

draw_circle(filled, x, y, w, h, color=nil, params={}) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 65
    def draw_circle(filled, x, y, w, h, color=nil, params={})
      draw_arc(filled, x, y, w, h, 0, 360, color, params)
    end

draw_circle_by_radius(filled, x, y, r, color=nil, params={}) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 69
    def draw_circle_by_radius(filled, x, y, r, color=nil, params={})
      draw_arc_by_radius(filled, x, y, r, 0, 360, color, params)
    end

draw_cone(filled, x, y, z, base, height, slices, stacks, color=nil) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 192
    def draw_cone(filled, x, y, z, base, height, slices, stacks, color=nil)
      not_support_method("draw_cone")
    end

draw_cube(filled, x, y, z, size, color=nil) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 184
    def draw_cube(filled, x, y, z, size, color=nil)
      not_support_method("draw_cube")
    end

draw_dodecahedron(filled, x, y, z, color=nil) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 209
    def draw_dodecahedron(filled, x, y, z, color=nil)
      not_support_method("draw_dodecahedron")
    end

draw_flag(x, y, pole_height, params) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 73
    def draw_flag(x, y, pole_height, params)
      if params["flag_type"] == "triangle"
        draw_triangle_flag(x, y, pole_height, params)
      else
        draw_rectangle_flag(x, y, pole_height, params)
      end
    end

draw_flag_layout(layout, x, y, pole_width, flag_width, text_height, flag_height) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 167
    def draw_flag_layout(layout, x, y, pole_width, flag_width,
                         text_height, flag_height)
      base_x = x + pole_width
      layout.width = flag_width * Pango::SCALE
      layout.alignment = Pango::Layout::ALIGN_CENTER
      base_y = y
      if text_height < flag_height
        base_y += (flag_height - text_height) / 2
      end
      draw_layout(layout, base_x, base_y)
    end

draw_icosahedron(filled, x, y, z, color=nil) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 213
    def draw_icosahedron(filled, x, y, z, color=nil)
      not_support_method("draw_icosahedron")
    end

draw_octahedron(filled, x, y, z, color=nil) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 205
    def draw_octahedron(filled, x, y, z, color=nil)
      not_support_method("draw_octahedron")
    end

draw_rectangle_flag(x, y, pole_height, params) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 128
    def draw_rectangle_flag(x, y, pole_height, params)
      params = setup_flag_params(pole_height, 1.3, params)

      layout = params["layout"]
      text_width = params["text_width"]
      text_height = params["text_height"]
      pole_width = params["pole_width"]
      pole_color = params["pole_color"]
      flag_height = params["flag_height"]
      flag_width = params["flag_width"]
      flag_color = params["flag_color"]
      flag_frame_width = params["flag_frame_width"]
      flag_frame_color = params["flag_frame_color"]

      draw_rectangle(true, x, y, pole_width, pole_height, pole_color)

      base_x = x + pole_width
      draw_rectangle(true,
                     base_x,
                     y,
                     flag_width,
                     flag_height,
                     flag_frame_color)
      draw_rectangle(true,
                     base_x,
                     y + flag_frame_width,
                     flag_width - flag_frame_width,
                     flag_height - 2 * flag_frame_width,
                     flag_color)

      if layout
        args = [
          layout, x, y, pole_width, flag_width - 2 * flag_frame_width,
          text_height, flag_height,
        ]
        draw_flag_layout(*args)
      end
    end

draw_slide(slide, simulation) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 51
    def draw_slide(slide, simulation)
      unless simulation
        save_context
        draw_background(slide)
      end
      yield
    ensure
      restore_context unless simulation
    end

draw_sphere(filled, x, y, z, radius, slices, stacks, color=nil) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 188
    def draw_sphere(filled, x, y, z, radius, slices, stacks, color=nil)
      not_support_method("draw_sphere")
    end

draw_teapot(filled, x, y, z, scale, color=nil) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 217
    def draw_teapot(filled, x, y, z, scale, color=nil)
      not_support_method("draw_teapot")
    end

draw_tetrahedron(filled, x, y, z, color=nil) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 201
    def draw_tetrahedron(filled, x, y, z, color=nil)
      not_support_method("draw_tetrahedron")
    end

draw_torus(filled, x, y, z, inner_radius, outer_radius, n_sides, rings, color=nil) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 196
    def draw_torus(filled, x, y, z, inner_radius, outer_radius,
                   n_sides, rings, color=nil)
      not_support_method("draw_torus")
    end

draw_triangle_flag(x, y, pole_height, params) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 81
    def draw_triangle_flag(x, y, pole_height, params)
      params = setup_flag_params(pole_height, 1.5, params)

      layout = params["layout"]
      text_width = params["text_width"]
      text_height = params["text_height"]
      pole_width = params["pole_width"]
      pole_color = params["pole_color"]
      flag_height = params["flag_height"]
      flag_width = params["flag_width"]
      flag_color = params["flag_color"]
      flag_frame_width = params["flag_frame_width"]
      flag_frame_color = params["flag_frame_color"]

      draw_rectangle(true, x, y, pole_width, pole_height, pole_color)

      base_x = x + pole_width
      draw_polygon(true,
                   [
                     [base_x, y],
                     [base_x + flag_width, y + flag_height / 2],
                     [base_x, y + flag_height],
                   ],
                   flag_frame_color)
      draw_polygon(true,
                   [
                     [base_x, y + flag_frame_width],
                     [
                       base_x + flag_width - 2 * flag_frame_width,
                       y + flag_height / 2
                     ],
                     [
                       base_x,
                       y + flag_height - flag_frame_width
                     ],
                   ],
                   flag_color)

      if layout
        args = [
          layout, x, y, pole_width, flag_width * 0.8,
          text_height, flag_height,
        ]
        draw_flag_layout(*args)
      end
    end

flag_size(pole_height, params) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 179
    def flag_size(pole_height, params)
      params = setup_flag_params(pole_height, 1.5, params)
      [params["pole_width"] + params["flag_width"], pole_height]
    end

gl_call_list(id, x, y, z, color=nil) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 225
    def gl_call_list(id, x, y, z, color=nil)
      not_support_method("gl_call_list")
    end

gl_compile(id) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 221
    def gl_compile(id)
      not_support_method("gl_compile")
    end

gl_supported?() click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 229
    def gl_supported?
      false
    end

make_color(color) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 14
    def make_color(color)
      return color if color.is_a?(Color)
      if color.nil?
        @foreground
      else
        Color.parse(color)
      end
    end

new_list_id() click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 241
    def new_list_id
      @list_id += 1
      @list_id
    end

poppler_available?() click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 10
    def poppler_available?
      false
    end

reflect_context(base, params={}) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 32
    def reflect_context(base, params={})
    end

restore_context() click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 48
    def restore_context
    end

rotate_context(angle, params={}) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 26
    def rotate_context(angle, params={})
    end

rsvg_available?() click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 6
    def rsvg_available?
      false
    end

save_context() click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 38
    def save_context
      if block_given?
        begin
          yield
        ensure
          restore_context
        end
      end
    end

scale_context(x, y, params={}) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 29
    def scale_context(x, y, params={})
    end

shear_context(x, y, params={}) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 35
    def shear_context(x, y, params={})
    end

translate_context(x, y, params={}) click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 23
    def translate_context(x, y, params={})
    end

z_far() click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 233
    def z_far
      100.0
    end

z_view() click to toggle source

    # File lib/rabbit/renderer/kernel.rb, line 237
    def z_view
      5.0
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.