vips-cpp 8.16 libvips C++ binding

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
VRegion Class Reference

`#include <VRegion8.h>`

Inheritance diagram for VRegion:
[legend]
Collaboration diagram for VRegion:
[legend]

## Public Member Functions
| VRegion (VipsRegion *region, VSteal steal=STEAL)
VipsRegion * | get_region () const
void | prepare (const VipsRect *rect) const
void | prepare (int left, int top, int width, int height) const
VipsRect | valid () const
VipsPel * | addr () const
VipsPel * | addr (size_t i) const
VipsPel * | addr (int x, int y) const
size_t | stride () const
VipsPel | operator[] (size_t i) const
VipsPel | operator() (int x, int y) const
Public Member Functions inherited from VObject
| VObject (VipsObject *new_vobject, VSteal steal=STEAL)
| VObject (const VObject &a)
VObject & | operator= (const VObject &a)
VipsObject * | get_object () const
bool | is_null () const

## Static Public Member Functions
static VRegion | new_from_image (VImage image)

## Detailed Description

A region of an image. Can be used to access raw pixel data.

## Constructor & Destructor Documentation

## ◆ VRegion()

VRegion::VRegion | ( | VipsRegion * | region,
|  | VSteal | steal = `STEAL`
| ) |  |
| inline explicit

Create a VRegion that wraps a VipsRegion object. If steal is STEAL, then this VRegion takes over ownership of the libvips object and will automatically unref it.

## Member Function Documentation

## ◆ addr() [1/3]

VipsPel * VRegion::addr | ( |  | ) | const
| inline

Get pointer to the start of the region.

## ◆ addr() [2/3]

VipsPel * VRegion::addr | ( | int | x,
|  | int | y
| ) |  | const
| inline

Get pointer at the given coordinates of the region.

## ◆ addr() [3/3]

VipsPel * VRegion::addr | ( | size_t | i | ) | const
| inline

Get pointer at the given index of the region.

## ◆ get_region()

VipsRegion * VRegion::get_region | ( |  | ) | const
| inline

Get a pointer to the underlying VipsRegion object.

## ◆ new_from_image()

VIPS_NAMESPACE_START VRegion VRegion::new_from_image | ( | VImage | image | ) |
| static

Create a VRegion from an image.

## ◆ operator()()

VipsPel VRegion::operator() | ( | int | x,
|  | int | y
| ) |  | const
| inline

Get VipsPel at the given coordinates of the region.

## ◆ operator[]()

VipsPel VRegion::operator[] | ( | size_t | i | ) | const
| inline

Get VipsPel at the given index of the region.

## ◆ prepare() [1/2]

void VRegion::prepare | ( | const VipsRect * | rect | ) | const
| inline

Prepare the region from VipsRect.

## ◆ prepare() [2/2]

void VRegion::prepare | ( | int | left,
|  | int | top,
|  | int | width,
|  | int | height
| ) |  | const
| inline

Prepare the region from rectangle coordinates.

## ◆ stride()

size_t VRegion::stride | ( |  | ) | const
| inline

Get the stride (bytes per row, including padding) of the region.

## ◆ valid()

VipsRect VRegion::valid | ( |  | ) | const
| inline

Get valid bounds of the region.

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

- /build/reproducible-path/vips-8.16.1/cplusplus/include/vips/VRegion8.h
- /build/reproducible-path/vips-8.16.1/cplusplus/VRegion.cpp