Pebble Foundation Classes  0.2.0
C++ for Pebble
Pebble::GPoint Struct Reference

#include <pebble_graphics_types.hpp>

Inheritance diagram for Pebble::GPoint:
Collaboration diagram for Pebble::GPoint:

Public Member Functions

 GPoint ()
 Constructs a new GPoint.
 
 GPoint (const ::GPoint &point)
 Converts from a Pebble GPoint.
 
 GPoint (int16_t x, int16_t y)
 
 operator const ::GPoint * () const
 Implicitly converts this instance to Pebble GPoint*.
 
 operator::GPoint * ()
 
bool operator== (const ::GPoint &point) const
 
bool operator!= (const ::GPoint &point) const
 

Additional Inherited Members

- Public Attributes inherited from GPoint
int16_t x
 The x-coordinate.
 
int16_t y
 The y-coordinate.
 

Detailed Description

Represents a point in a 2-dimensional coordinate system.

Note
Conventionally, the origin of Pebble's 2D coordinate system is in the upper, lefthand corner its x-axis extends to the right and its y-axis extends to the bottom of the screen.

Constructor & Destructor Documentation

◆ GPoint()

Pebble::GPoint::GPoint ( int16_t  x,
int16_t  y 
)
inline

Constructs a GPoint from X and Y coordinates

Parameters
xThe X coordinate
yThe Y coordinate

Member Function Documentation

◆ operator!=()

bool Pebble::GPoint::operator!= ( const ::GPoint point) const
inline

Tests whether 2 points are not equal.

Parameters
pointThe second point
Returns
true if both points are not equal, false if not.

◆ operator==()

bool Pebble::GPoint::operator== ( const ::GPoint point) const
inline

Tests whether 2 points are equal.

Parameters
pointThe second point
Returns
true if both points are equal, false if not.

The documentation for this struct was generated from the following file: