Class: RubySketch::Processing::Graphics
- Inherits:
-
Object
- Object
- RubySketch::Processing::Graphics
- Includes:
- GraphicsContext
- Defined in:
- lib/rubysketch/processing.rb
Overview
Draws graphics into an offscreen buffer
Constant Summary
Constants included from GraphicsContext
RubySketch::Processing::GraphicsContext::BASELINE, RubySketch::Processing::GraphicsContext::BOTTOM, RubySketch::Processing::GraphicsContext::BUTT, RubySketch::Processing::GraphicsContext::CENTER, RubySketch::Processing::GraphicsContext::CORNER, RubySketch::Processing::GraphicsContext::CORNERS, RubySketch::Processing::GraphicsContext::DEGREES, RubySketch::Processing::GraphicsContext::HALF_PI, RubySketch::Processing::GraphicsContext::HSB, RubySketch::Processing::GraphicsContext::LEFT, RubySketch::Processing::GraphicsContext::MITER, RubySketch::Processing::GraphicsContext::PI, RubySketch::Processing::GraphicsContext::QUARTER_PI, RubySketch::Processing::GraphicsContext::RADIANS, RubySketch::Processing::GraphicsContext::RADIUS, RubySketch::Processing::GraphicsContext::RGB, RubySketch::Processing::GraphicsContext::RIGHT, RubySketch::Processing::GraphicsContext::ROUND, RubySketch::Processing::GraphicsContext::SQUARE, RubySketch::Processing::GraphicsContext::TAU, RubySketch::Processing::GraphicsContext::TOP, RubySketch::Processing::GraphicsContext::TWO_PI, RubySketch::Processing::GraphicsContext::Vector
Instance Method Summary collapse
- #beginDraw ⇒ Object
- #endDraw ⇒ Object
-
#initialize(width, height) ⇒ Graphics
constructor
A new instance of Graphics.
Methods included from GraphicsContext
#angleMode, #arc, #background, #bezier, #circle, #colorMode, #copy, #curve, #ellipse, #ellipseMode, #fill, #height, #image, #imageMode, #line, #noFill, #noStroke, #point, #pop, #popMatrix, #popStyle, #push, #pushMatrix, #pushStyle, #quad, #rect, #rectMode, #resetMatrix, #rotate, #scale, #setup__, #square, #stroke, #strokeCap, #strokeJoin, #strokeWeight, #text, #textAlign, #textAscent, #textDescent, #textFont, #textSize, #textWidth, #translate, #triangle, #width
Constructor Details
#initialize(width, height) ⇒ Graphics
Returns a new instance of Graphics
1613 1614 1615 1616 |
# File 'lib/rubysketch/processing.rb', line 1613 def initialize (width, height) @image__ = Rays::Image.new width, height setup__ @image__.painter end |
Instance Method Details
#beginDraw ⇒ Object
1618 1619 1620 1621 1622 |
# File 'lib/rubysketch/processing.rb', line 1618 def beginDraw () @painter__.__send__ :begin_paint super push end |
#endDraw ⇒ Object
1624 1625 1626 1627 1628 |
# File 'lib/rubysketch/processing.rb', line 1624 def endDraw () pop super @painter__.__send__ :end_paint end |