Class WPointF

java.lang.Object

public class WPointF
extends WJavaScriptExposableObject
A value class that defines a 2D point.

JavaScript exposability

A WPointF is JavaScript exposable. If a WPointF is JavaScript bound, it can be accessed in your custom JavaScript code through its handle's jsRef(). A point is represented in JavaScript as an array of two elements, e.g. a point WPointF(10,20) will be represented in JavaScript as:


 [10, 20]

 

Warning: A WPointF that is JavaScript exposed should be modified only through its handle. Any attempt at modifying it will cause an exception to be thrown.

See Also:
WPaintedWidget.createJSPoint()
  • Constructor Details

    • WPointF

      public WPointF()
      Creates point (0, 0).
    • WPointF

      public WPointF​(double x, double y)
      Creates a point (x, y).
    • WPointF

      public WPointF​(WPointF other)
      Copy constructor.
    • WPointF

      public WPointF​(Coordinates other)
      Creates a point from mouse coordinates.
  • Method Details