SkIPoint Struct Reference

#include <SkPoint.h>

List of all members.

Public Member Functions

void set (int32_t x, int32_t y)
void rotateCW (SkIPoint *dst) const
void rotateCW ()
void rotateCCW (SkIPoint *dst) const
void rotateCCW ()
void negate ()
SkIPoint operator- () const
void operator+= (const SkIPoint &v)
void operator-= (const SkIPoint &v)
bool equals (int32_t x, int32_t y) const

Static Public Member Functions

static int32_t DotProduct (const SkIPoint &a, const SkIPoint &b)
static int32_t CrossProduct (const SkIPoint &a, const SkIPoint &b)

Public Attributes

int32_t fX
int32_t fY

Friends

bool operator== (const SkIPoint &a, const SkIPoint &b)
bool operator!= (const SkIPoint &a, const SkIPoint &b)
SkIPoint operator- (const SkIPoint &a, const SkIPoint &b)
SkIPoint operator+ (const SkIPoint &a, const SkIPoint &b)

Detailed Description

SkIPoint holds two 32 bit integer coordinates

Definition at line 27 of file SkPoint.h.


Member Function Documentation

static int32_t SkIPoint::CrossProduct ( const SkIPoint a,
const SkIPoint b 
) [inline, static]

Returns the cross product of a and b, treating them as 2D vectors

Definition at line 117 of file SkPoint.h.

static int32_t SkIPoint::DotProduct ( const SkIPoint a,
const SkIPoint b 
) [inline, static]

Returns the dot product of a and b, treating them as 2D vectors

Definition at line 111 of file SkPoint.h.

bool SkIPoint::equals ( int32_t  x,
int32_t  y 
) const [inline]

Returns true if the point's coordinates equal (x,y)

Definition at line 80 of file SkPoint.h.

void SkIPoint::negate (  )  [inline]

Negate the X and Y coordinates of the point.

Definition at line 55 of file SkPoint.h.

void SkIPoint::operator+= ( const SkIPoint v  )  [inline]

Add v's coordinates to this point's

Definition at line 68 of file SkPoint.h.

SkIPoint SkIPoint::operator- (  )  const [inline]

Return a new point whose X and Y coordinates are the negative of the original point's

Definition at line 60 of file SkPoint.h.

void SkIPoint::operator-= ( const SkIPoint v  )  [inline]

Subtract v's coordinates from this point's

Definition at line 74 of file SkPoint.h.

void SkIPoint::rotateCCW (  )  [inline]

Rotate the point counter-clockwise, writing the new point back into the point

Definition at line 51 of file SkPoint.h.

void SkIPoint::rotateCCW ( SkIPoint dst  )  const

Rotate the point counter-clockwise, writing the new point into dst. It is legal for dst == this

void SkIPoint::rotateCW (  )  [inline]

Rotate the point clockwise, writing the new point back into the point

Definition at line 41 of file SkPoint.h.

void SkIPoint::rotateCW ( SkIPoint dst  )  const

Rotate the point clockwise, writing the new point into dst It is legal for dst == this

void SkIPoint::set ( int32_t  x,
int32_t  y 
) [inline]

Set the x and y values of the point.

Definition at line 31 of file SkPoint.h.


Friends And Related Function Documentation

bool operator!= ( const SkIPoint a,
const SkIPoint b 
) [friend]

Definition at line 88 of file SkPoint.h.

SkIPoint operator+ ( const SkIPoint a,
const SkIPoint b 
) [friend]

Returns a new point whose coordinates are the sum of a and b (a + b)

Definition at line 103 of file SkPoint.h.

SkIPoint operator- ( const SkIPoint a,
const SkIPoint b 
) [friend]

Returns a new point whose coordinates are the difference between a and b (i.e. a - b)

Definition at line 95 of file SkPoint.h.

bool operator== ( const SkIPoint a,
const SkIPoint b 
) [friend]

Definition at line 84 of file SkPoint.h.


Member Data Documentation

int32_t SkIPoint::fX

Definition at line 28 of file SkPoint.h.

int32_t SkIPoint::fY

Definition at line 28 of file SkPoint.h.


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

Generated on Tue Oct 20 11:03:42 2009 for Skia by  doxygen 1.6.1