avcpp 3.2.1
Wrapper for the FFmpeg that simplify usage from C++ projects.
Loading...
Searching...
No Matches
av::Rect Class Reference

Rectangle: a position and a size. More...

#include <rect.h>

Public Member Functions

 Rect () noexcept=default
 Create a zero-sized rectangle at the origin.
 Rect (int width, int height) noexcept
 Create a rectangle at the origin.
 Rect (int x, int y, int width, int height) noexcept
 Create a rectangle at a position.
void setX (int x) noexcept
 Set the left edge.
void setY (int y) noexcept
 Set the top edge.
void setWidth (int w) noexcept
 Set the width.
void setHeight (int h) noexcept
 Set the height.
int getX () const noexcept
 The left edge.
int getY () const noexcept
 The top edge.
int getWidth () const noexcept
 The width.
int getHeight () const noexcept
 The height.

Detailed Description

Used where FFmpeg deals in areas rather than points, for example a subtitle bitmap or a crop window.

Constructor & Destructor Documentation

◆ Rect() [1/2]

av::Rect::Rect ( int width,
int height )
noexcept
Parameters
widthwidth in pixels
heightheight in pixels

◆ Rect() [2/2]

av::Rect::Rect ( int x,
int y,
int width,
int height )
noexcept
Parameters
xleft edge in pixels
ytop edge in pixels
widthwidth in pixels
heightheight in pixels

Member Function Documentation

◆ getHeight()

int av::Rect::getHeight ( ) const
inlinenoexcept
Returns
height in pixels

◆ getWidth()

int av::Rect::getWidth ( ) const
inlinenoexcept
Returns
width in pixels

◆ getX()

int av::Rect::getX ( ) const
inlinenoexcept
Returns
position in pixels

◆ getY()

int av::Rect::getY ( ) const
inlinenoexcept
Returns
position in pixels

◆ setHeight()

void av::Rect::setHeight ( int h)
inlinenoexcept
Parameters
hheight in pixels

◆ setWidth()

void av::Rect::setWidth ( int w)
inlinenoexcept
Parameters
wwidth in pixels

◆ setX()

void av::Rect::setX ( int x)
inlinenoexcept
Parameters
xposition in pixels

◆ setY()

void av::Rect::setY ( int y)
inlinenoexcept
Parameters
yposition in pixels

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