Main Page Widgets Namespaces Book

# Gdk::Region Class Reference

List of all members.

## Detailed Description

This is an opaque data type holding a set of arbitrary pixels, and is usually used for clipping graphical operations (see Gdk::GC::set_clip_region()).

## Public Member Functions
bool | empty ()
void | get_clipbox (const Rectangle& rectangle)
Glib::ArrayHandle<Rectangle> | get_rectangles () const
const GdkRegion* | gobj () const
GdkRegion* | gobj ()
GdkRegion* | gobj_copy () const
| Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
void | intersect (const Region& source2)
| Sets the area of source1 to the intersection of the areas of source1 and source2 .
void | offset (int dx, int dy)
Region& | operator= (const Region& src)
bool | point_in (int x, int y)
OverlapType | rect_in (const Rectangle& rect)
| Region (const Rectangle& rectangle)
| Region (const Glib::ArrayHandle<Gdk::Point>& points, FillRule fill_rule)
| Region (const Region& src)
| Region (GdkRegion* castitem, bool make_a_copy=false)
| Region ()
void | shrink (int dx, int dy)
void | spans_intersect_foreach (GdkSpan* spans, int n_spans, bool sorted, GdkSpanFunc function, gpointer data)
void | subtract (const Region& source2)
| Subtracts the area of source2 from the area source1 .
void | union_ (const Region& source2)
| Sets the area of source1 to the union of the areas of source1 and source2 .
void | union_with_rect (const Rectangle& rect)
| Sets the area of region to the union of the areas of region and rect .
void | xor_ (const Region& source2)
| Sets the area of source1 to the exclusive-OR of the areas of source1 and source2 .
| ~Region ()
## Protected Attributes
GdkRegion* | gobject_
## Related Functions
(Note that these are not member functions.)
bool | operator!= (const Region& lhs, const Region& rhs)
bool | operator== (const Region& lhs, const Region& rhs)
Gdk::Region | wrap (GdkRegion* object, bool take_copy=false)

## Constructor & Destructor Documentation

Gdk::Region::Region | ( |  | ) |

Gdk::Region::Region | ( | GdkRegion* | castitem,
|  | bool | make_a_copy = `false`
| ) | `[explicit]`

Gdk::Region::Region | ( | const Region& | src | ) |

Gdk::Region::~Region | ( |  | ) |

Gdk::Region::Region | ( | const Glib::ArrayHandle<Gdk::Point>& | points,
|  | FillRule | fill_rule
| ) |

Gdk::Region::Region | ( | const Rectangle& | rectangle | ) | `[explicit]`

## Member Function Documentation

bool Gdk::Region::empty | ( |  | ) |

void Gdk::Region::get_clipbox | ( | const Rectangle& | rectangle | ) |

Glib::ArrayHandle<Rectangle> Gdk::Region::get_rectangles | ( |  | ) | const

const GdkRegion* Gdk::Region::gobj | ( |  | ) | const`[inline]`

GdkRegion* Gdk::Region::gobj | ( |  | ) | `[inline]`

GdkRegion* Gdk::Region::gobj_copy | ( |  | ) | const

| Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.

void Gdk::Region::intersect | ( | const Region& | source2 | ) |

  | Sets the area of source1 to the intersection of the areas of source1 and source2 . The resulting area is the set of pixels contained in both source1 and source2 . Parameters:
  | source2 | Another Gdk::Region.

void Gdk::Region::offset | ( | int | dx,
|  | int | dy
| ) |

Region& Gdk::Region::operator= | ( | const Region& | src | ) |

bool Gdk::Region::point_in | ( | int | x,
|  | int | y
| ) |

OverlapType Gdk::Region::rect_in | ( | const Rectangle& | rect | ) |

void Gdk::Region::shrink | ( | int | dx,
|  | int | dy
| ) |

void Gdk::Region::spans_intersect_foreach | ( | GdkSpan* | spans,
|  | int | n_spans,
|  | bool | sorted,
|  | GdkSpanFunc | function,
|  | gpointer | data
| ) |

void Gdk::Region::subtract | ( | const Region& | source2 | ) |

  | Subtracts the area of source2 from the area source1 . The resulting area is the set of pixels contained in source1 but not in source2 . Parameters:
  | source2 | Another Gdk::Region.

void Gdk::Region::union_ | ( | const Region& | source2 | ) |

  | Sets the area of source1 to the union of the areas of source1 and source2 . The resulting area is the set of pixels contained in either source1 or source2 . Parameters:
  | source2 | A Gdk::Region.

void Gdk::Region::union_with_rect | ( | const Rectangle& | rect | ) |

  | Sets the area of region to the union of the areas of region and rect . The resulting area is the set of pixels contained in either region or rect . Parameters:
  | rect | A Gdk::Rectangle.

void Gdk::Region::xor_ | ( | const Region& | source2 | ) |

  | Sets the area of source1 to the exclusive-OR of the areas of source1 and source2 . The resulting area is the set of pixels contained in one or the other of the two sources but not in both. Parameters:
  | source2 | Another Gdk::Region.

## Friends And Related Function Documentation

bool operator!= | ( | const Region& | lhs,
|  | const Region& | rhs
| ) | `[related]`

  | Parameters:
  | lhs | The left-hand side
  | rhs | The right-hand side
Returns: The result

bool operator== | ( | const Region& | lhs,
|  | const Region& | rhs
| ) | `[related]`

  | Parameters:
  | lhs | The left-hand side
  | rhs | The right-hand side
Returns: The result

Gdk::Region wrap | ( | GdkRegion* | object,
|  | bool | take_copy = `false`
| ) | `[related]`

  | Parameters:
  | object | The C instance
  | take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns: A C++ instance that wraps this C instance.

## Member Data Documentation

GdkRegion* Gdk::Region::gobject_`[protected]`

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

- region.h