Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# Inti::Gdk::Span Class Reference

A GdkSpan C++ wrapper class. More...

`#include <inti/gdk/types.h>`

List of all members.

## Public Member Functions

Constructors

- Span ()
    Construct a null span with x, y and width set to 0.
- Span (int x, int y, int width)
    Construct a new span.
- Span (const Point &first, int width)
    Construct a new span.

Accessors

- GdkSpan * gdk_span () const
    Get a pointer to the GdkSpan structure.
- operator GdkSpan * () const
    Conversion operator; safely converts a Span to a GdkSpan pointer.
- int x () const
    Returns the X coordinate of the first point in the span.
- int y () const
    Returns the Y coordinate of the first point in the span.
- int width () const
    Returns the number of pixels in the span.
- bool equal (const Span &other) const
    Returns true if this span and other compare equal.
- bool operator== (const Span &other) const
    Returns true if this span and other compare equal.
- bool operator!= (const Span &other) const
    Returns true if this span and other compare unequal.

Methods

- void set (int x, int y)
    Sets the coordinates for the first pixel in the span.
- void set (const Point &first)
    Sets the coordinates for the first pixel in the span.
- void set (int x, int y, int width)
    Sets the position and width of the span.
- void set (const Point &first, int width)
    Sets the position and width of the span.

## Detailed Description

A GdkSpan C++ wrapper class.

Span represents a horizontal line of pixels starting at the pixel with coordinates x, y and ending before x + width, y. Span uses default copy, assignment and destruction, and allows public access to x, y and width.

## Constructor & Destructor Documentation

Inti::Gdk::Span::Span | ( | int | x,
|  | int | y,
|  | int | width
| ) |

Construct a new span.

Parameters:

  x | The X coordinate of the first pixel in the span.
  y | The Y coordinate of the first pixel in the span.
  width | The number of pixels in the span.

Inti::Gdk::Span::Span | ( | const Point & | first,
|  | int | width
| ) |

Construct a new span.

Parameters:

  first | The x, y coordinates of the first pixel in the span.
  width | The number of pixels in the span.

## Member Function Documentation

bool Inti::Gdk::Span::equal | ( | const Span & | other | ) | const

Returns true if this span and other compare equal.

Parameters:

  other | A Span.

bool Inti::Gdk::Span::operator!= | ( | const Span & | other | ) | const

Returns true if this span and other compare unequal.

Parameters:

  other | A Span.

bool Inti::Gdk::Span::operator== | ( | const Span & | other | ) | const

Returns true if this span and other compare equal.

Parameters:

  other | A Span.

void Inti::Gdk::Span::set | ( | const Point & | first,
|  | int | width
| ) |

Sets the position and width of the span.

Parameters:

  first | The x, y coordinates of the first pixel in the span.
  width | The number of pixels in the span.

void Inti::Gdk::Span::set | ( | int | x,
|  | int | y,
|  | int | width
| ) |

Sets the position and width of the span.

Parameters:

  x | The X coordinate of the first pixel in the span.
  y | The Y coordinate of the first pixel in the span.
  width | The number of pixels in the span.

void Inti::Gdk::Span::set | ( | const Point & | first | ) |

Sets the coordinates for the first pixel in the span.

Parameters:

  first | The x, y coordinates of the first pixel in the span.

void Inti::Gdk::Span::set | ( | int | x,
|  | int | y
| ) |

Sets the coordinates for the first pixel in the span.

Parameters:

  x | The X coordinate of the first pixel in the span.
  y | The Y coordinate of the first pixel in the span.

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

- gdk/types.h

Main Page - Footer