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 the 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(*args) ⇒ Object
- #add_line_to_point(*args) ⇒ Object
-
#add_path(path) ⇒ void
Adds another path onto the current path.
- #add_quad_curve_to_point(*args) ⇒ Object
- #add_rectangle(*args) ⇒ Object
- #add_rounded_rectangle(*args) ⇒ Object
-
#close_subpath ⇒ void
Closes the current sub-path.
- #contains(*args) ⇒ Object
-
#get_box ⇒ Wx::Rect2DDouble
(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 the 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, then a straight line connecting these points is also appended. If there is no current point before the call to #add_arc_to_point, then 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
298 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 298 def add_curve_to_point(*args) end |
#add_ellipse(x, y, w, h) ⇒ void #add_ellipse(rect) ⇒ void
313 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 313 def add_ellipse(*args) end |
#add_line_to_point(x, y) ⇒ void #add_line_to_point(p) ⇒ void
328 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 328 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.
335 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 335 def add_path(path) end |
#add_quad_curve_to_point(cx, cy, x, y) ⇒ void #add_quad_curve_to_point(cp, e) ⇒ void
352 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 352 def add_quad_curve_to_point(*args) end |
#add_rectangle(x, y, w, h) ⇒ void #add_rectangle(rect) ⇒ void
367 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 367 def add_rectangle(*args) end |
#add_rounded_rectangle(x, y, w, h, radius) ⇒ void #add_rounded_rectangle(rect, radius) ⇒ void
384 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 384 def add_rounded_rectangle(*args) 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 end point of the sub-path.
390 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 390 def close_subpath; end |
#contains(c, fillStyle = Wx::PolygonFillMode::ODDEVEN_RULE) ⇒ Boolean #contains(x, y, fillStyle = Wx::PolygonFillMode::ODDEVEN_RULE) ⇒ Boolean
407 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 407 def contains(*args) end |
#get_box ⇒ Wx::Rect2DDouble Also known as: box
Gets the bounding box enclosing all points (possibly including control points).
411 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 411 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.
416 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 416 def get_current_point; end |
#move_to_point(x, y) ⇒ void #move_to_point(p) ⇒ void
428 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 428 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.
435 |
# File 'lib/wx/doc/gen/graphics_object.rb', line 435 def transform(matrix) end |