Class: Wx::GraphicsPath
- Inherits:
-
GraphicsObject
- Object
- Object
- GraphicsObject
- Wx::GraphicsPath
- Defined in:
- lib/wx/doc/gen/graphics_object.rb
Overview
A GraphicsPath is a native representation of a geometric path.
The contents are specific and private to the respective renderer. Instances are reference counted and can therefore be assigned as usual. The only way to get a valid instance is by using Wx::GraphicsContext#create_path or Wx::GraphicsRenderer#create_path.
Category: Graphics Device Interface (GDI)
Instance Method Summary collapse
- #add_arc(*args) ⇒ Object
-
#add_arc_to_point(x1, y1, x2, y2, r) ⇒ void
Adds an arc (of a circle with radius r) that is tangent to the line connecting current point and (x1, y1) and to the line connecting (x1, y1) and (x2, y2).
-
#add_circle(x, y, r) ⇒ void
Appends a circle around (x,y) with radius r as a new closed subpath.
- #add_curve_to_point(*args) ⇒ Object
-
#add_ellipse(x, y, w, h) ⇒ void
Appends an ellipse fitting into the passed in rectangle as a new closed subpath.
- #add_line_to_point(*args) ⇒ Object
-
#add_path(path) ⇒ void
Adds another path onto the current path.
-
#add_quad_curve_to_point(cx, cy, x, y) ⇒ void
Adds a quadratic bezier curve from the current point, using a control point and an end point.
-
#add_rectangle(x, y, w, h) ⇒ void
Appends a rectangle as a new closed subpath.
-
#add_rounded_rectangle(x, y, w, h, radius) ⇒ void
Appends a rounded rectangle as a new closed subpath.
-
#close_subpath ⇒ void
Closes the current sub-path.
- #contains(*args) ⇒ Object
-
#get_box ⇒ Array(Float,Float,Float,Float)
(also: #box)
Gets the bounding box enclosing all points (possibly including control points).
-
#get_current_point ⇒ Wx::Point2DDouble
(also: #current_point)
Gets the last point of the current path, (0,0) if not yet set.
- #move_to_point(*args) ⇒ Object
-
#transform(matrix) ⇒ void
Transforms each point of this path by the matrix.
Methods inherited from GraphicsObject
Methods inherited from Object
#clone, #dup, #initialize, #is_same_as, #un_share
Constructor Details
This class inherits a constructor from Wx::Object
Instance Method Details
#add_arc(x, y, r, startAngle, endAngle, clockwise) ⇒ void #add_arc(c, r, startAngle, endAngle, clockwise) ⇒ void
255 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 255 def add_arc(*args) end |
#add_arc_to_point(x1, y1, x2, y2, r) ⇒ void
This method returns an undefined value.
Adds an arc (of a circle with radius r) that is tangent to the line connecting current point and (x1, y1) and to the line connecting (x1, y1) and (x2, y2).
If the current point and the starting point of the arc are different, a straight line connecting these points is also appended. If there is no current point before the call to #add_arc_to_point this function will behave as if preceded by a call to MoveToPoint(0, 0). After this call the current point will be at the ending point of the arc.
266 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 266 def add_arc_to_point(x1, y1, x2, y2, r) end |
#add_circle(x, y, r) ⇒ void
This method returns an undefined value.
Appends a circle around (x,y) with radius r as a new closed subpath.
After this call the current point will be at (x+r, y).
275 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 275 def add_circle(x, y, r) end |
#add_curve_to_point(cx1, cy1, cx2, cy2, x, y) ⇒ void #add_curve_to_point(c1, c2, e) ⇒ void
296 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 296 def add_curve_to_point(*args) end |
#add_ellipse(x, y, w, h) ⇒ void
This method returns an undefined value.
Appends an ellipse fitting into the passed in rectangle as a new closed subpath.
After this call the current point will be at (x+w, y+h/2).
306 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 306 def add_ellipse(x, y, w, h) end |
#add_line_to_point(x, y) ⇒ void #add_line_to_point(p) ⇒ void
321 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 321 def add_line_to_point(*args) end |
#add_path(path) ⇒ void
This method returns an undefined value.
Adds another path onto the current path.
After this call the current point will be at the added path’s current point. For Direct2D the path being appended shouldn’t contain a started non-empty subpath when this function is called.
328 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 328 def add_path(path) end |
#add_quad_curve_to_point(cx, cy, x, y) ⇒ void
This method returns an undefined value.
Adds a quadratic bezier curve from the current point, using a control point and an end point.
If there is no current point before the call to #add_quad_curve_to_point this function will behave as if preceded by a call to MoveToPoint(cx, cy).
338 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 338 def add_quad_curve_to_point(cx, cy, x, y) end |
#add_rectangle(x, y, w, h) ⇒ void
This method returns an undefined value.
Appends a rectangle as a new closed subpath.
After this call the current point will be at (x, y).
348 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 348 def add_rectangle(x, y, w, h) end |
#add_rounded_rectangle(x, y, w, h, radius) ⇒ void
This method returns an undefined value.
Appends a rounded rectangle as a new closed subpath.
If radius equals 0 this function will behave as #add_rectangle, otherwise after this call the current point will be at (x+w, y+h/2).
359 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 359 def add_rounded_rectangle(x, y, w, h, radius) end |
#close_subpath ⇒ void
This method returns an undefined value.
Closes the current sub-path.
After this call the current point will be at the joined endpoint of the sub-path.
365 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 365 def close_subpath; end |
#contains(c, fillStyle = Wx::PolygonFillMode::ODDEVEN_RULE) ⇒ Boolean #contains(x, y, fillStyle = Wx::PolygonFillMode::ODDEVEN_RULE) ⇒ Boolean
382 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 382 def contains(*args) end |
#get_box ⇒ Array(Float,Float,Float,Float) Also known as: box
Gets the bounding box enclosing all points (possibly including control points).
386 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 386 def get_box; end |
#get_current_point ⇒ Wx::Point2DDouble Also known as: current_point
Gets the last point of the current path, (0,0) if not yet set.
391 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 391 def get_current_point; end |
#move_to_point(x, y) ⇒ void #move_to_point(p) ⇒ void
403 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 403 def move_to_point(*args) end |
#transform(matrix) ⇒ void
This method returns an undefined value.
Transforms each point of this path by the matrix.
For Direct2D the current path shouldn’t contain a started non-empty subpath when this function is called.
410 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 410 def transform(matrix) end |