Class Joyau::Line
In: Drawable.cpp
Parent: Joyau::Shape

Class used in order to draw lines.

Methods

getPoint   point   point=   setPoint   set_point  

Public Instance methods

Returns the line’s second point.

[Source]

/*
  Returns the line's second point.
*/
VALUE Line_getPoint(VALUE self)
{
   Line &ref = getRef<Line>(self);
   Point point = ref.getPoint();

   return createObject(getClass("Point"), point);
}
point()

Alias for getPoint

Sets the line’s second point (the first one is set with Drawable#setPos).

[Source]

/*
  call-seq: point=(p)

  Sets the line's second point (the first one is set with Drawable#setPos).
*/
VALUE Line_setPointPoint(VALUE self, VALUE p)

Sets the line’s second point (the first one is set with Drawable#setPos).

[Source]

/*
  call-seq: setPoint(x, y)

  Sets the line's second point (the first one is set with Drawable#setPos).
*/
VALUE Line_setPoint(VALUE self, VALUE x, VALUE y)
{
   Line &ref = getRef<Line>(self);
   int _x = FIX2INT(x);
   int _y = FIX2INT(y);

   ref.setPoint(_x, _y);
   return Qnil;
}
set_point(p1, p2)

Alias for setPoint

[Validate]