Xfce Foundation Classes
Main Page | Index | Namespace List | Alphabetical List | Class List | File List

# Xfc::Gdk::Span Class Reference

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

`#include <xfc/gdk/types.hh>`

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

Xfc::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.

Xfc::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 Xfc::Gdk::Span::equal | ( | const Span & | other | ) | const

Returns true if this span and other compare equal.

Parameters:

  | other | A Span.

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

Returns true if this span and other compare unequal.

Parameters:

  | other | A Span.

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

Returns true if this span and other compare equal.

Parameters:

  | other | A Span.

void Xfc::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 Xfc::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 Xfc::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 Xfc::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.hh

Xfce Foundation Classes

Copyright © 2004-2005 The XFC Development Team | XFC 4.3