Public Types | |
enum | ProxySetting { PROXY_OFF, PROXY_NEVER, PROXY_SCALE_DOWN, PROXY_NEAREST, PROXY_ALWAYS } |
Public Member Functions | |
double | frame () const |
void | setFrame (double v) |
void | frame (double v) |
int | view () const |
void | setView (int v) |
void | view (int v) |
ProxySetting | proxy () const |
void | setProxy (ProxySetting v) |
float | scale_x () const |
float | scale_y () const |
float | translate_x () const |
float | translate_y () const |
void | setProxyscale (float scale) |
void | setProxyscale (float sx, float sy) |
void | setProxyscale (const Format &fullsize, const Format &proxysize) |
void | setProxyscale (const Matrix4 &) |
void | scale (float scale) |
void | scale (float sx, float sy) |
void | translate (float x, float y) |
bool | isIdentity () const |
void | to_proxy (Matrix4 &) const |
void | to_proxy_wh (double &w, double &h) const |
void | to_proxy_wh (float &w, float &h) const |
double | to_proxy_w (double w) const |
double | to_proxy_h (double w) const |
void | to_proxy_xy (double &x, double &y) const |
void | to_proxy_xy (float &x, float &y) const |
double | to_proxy_x (double w) const |
double | to_proxy_y (double w) const |
void | to_proxy_box (DD::Image::Box &box) const |
void | to_proxy_area (double &w, double &h) const |
double | to_proxy_area (double area) const |
void | to_proxy (const Format &from, Format &to) const |
const Format * | to_proxy_rel (const Format &from, Format &to, const OutputContext &) const |
double | to_proxy_pixel_aspect (double pa) const |
void | from_proxy (Matrix4 &) const |
void | from_proxy_xy (double &x, double &y) const |
void | from_proxy_wh (double &w, double &h) const |
void | from_proxy_xy (float &x, float &y) const |
void | from_proxy_wh (float &w, float &h) const |
double | from_proxy_area (double area) const |
double | from_proxy_pixel_aspect (double pa) const |
void | append (Hash &) const |
void | appendProxy (Hash &hash) const |
append the values affecting proxy scaling to the hash (i.e. not frame or view) | |
bool | operator== (const OutputContext &other) const |
bool | operator< (const OutputContext &other) const |
bool | operator!= (const OutputContext &other) const |
const std::string & | viewname () const |
bool | sameProxy (const DD::Image::OutputContext &other) const |
Static Public Member Functions | |
static const OutputContext & | defaultContext () |
static const std::string & | viewname (int v) |
static const std::string & | viewshort (int v) |
static int | viewcount () |
static int | lookup_view (const std::string &viewname) |
static void | set_viewnames (const std::string &s) |
Static Public Attributes | |
static const OutputContext | default_ |
static void(* | create_view )(const std::string &s) |
Friends | |
std::ostream & | operator<< (std::ostream &o, const OutputContext &) |
void OutputContext::setProxyscale | ( | float | scale | ) | [inline] |
Set to_proxy() to scale coordinates by the given factor (which should be less or equal to 1).
Referenced by DD::Image::Read::_validate().
Set the scaling to the conversion from full to proxy.
References DD::Image::Format::pixel_aspect(), DD::Image::Box::t(), DD::Image::Box::w(), DD::Image::Box::x(), and DD::Image::Box::y().
void OutputContext::setProxyscale | ( | const Matrix4 & | m | ) |
Set the scaling to the transform in the matrix (which had better only have scale and translations).
References DD::Image::Matrix4::a00, DD::Image::Matrix4::a03, DD::Image::Matrix4::a11, DD::Image::Matrix4::a13, and DD::Image::Matrix4::a33.
void OutputContext::scale | ( | float | scale | ) | [inline] |
Multiply the proxy scaling by the factor (which is normally less or equal to 1). The picture output by the operator will be scaled by this factor.
void OutputContext::translate | ( | float | x, | |
float | y | |||
) | [inline] |
Translate the to_proxy_xy() by the given number of pixels. The picture output by the operator will be translated by this factor.
void OutputContext::to_proxy | ( | Matrix4 & | m | ) | const |
Multiply the matrix by the transformation from full-size space to proxy space. If the matrix was the identity, it will now be a transform from full size to proxy.
References DD::Image::Matrix4::scale(), and DD::Image::Matrix4::translate().
Referenced by DD::Image::Read::_validate().
void OutputContext::to_proxy_wh | ( | double & | w, | |
double & | h | |||
) | const [inline] |
Transform a vector/distance from full size to proxy space. This is different than to_proxy_xy if there is a translation of the origin.
Referenced by DD::Image::Read::_validate().
void OutputContext::to_proxy_xy | ( | double & | x, | |
double & | y | |||
) | const [inline] |
Transform an xy position from full size to proxy space.
Referenced by DD::Image::Read::_validate().
void OutputContext::to_proxy_area | ( | double & | w, | |
double & | h | |||
) | const [inline] |
Return the size of a rectangle with the same area as the 0,0,w,h rectangle transformed to proxy scale, and approximatly the same shape. This is the same as to_proxy_wh as long as there is no rotation. The shape exactly matches as long as rotations are 90 degrees.
double OutputContext::to_proxy_area | ( | double | area | ) | const [inline] |
Return the area of a shape of the given area when converted from full size to proxy space.
Replace the contents of to with the scaled version of from. Integer values are rounded to the nearest match. The name of the format is set to null.
References fast_rint(), DD::Image::Format::height(), DD::Image::Format::name(), DD::Image::Format::pixel_aspect(), DD::Image::Box::r(), DD::Image::Box::t(), DD::Image::Format::width(), DD::Image::Box::x(), and DD::Image::Box::y().
const Format * OutputContext::to_proxy_rel | ( | const Format & | from, | |
Format & | to, | |||
const OutputContext & | rel | |||
) | const |
from is the result of rel.to_proxy. Undoes the rel.to_proxy, and then applies this.to_proxy to the result. If this results in from then from is returned. Otherwise the result is written over to and that is returned. This is a weird action used by Nuke.
References a, d, e, f, fast_rint(), DD::Image::Format::height(), DD::Image::Format::name(), DD::Image::Format::pixel_aspect(), DD::Image::Box::r(), DD::Image::Box::t(), DD::Image::Format::width(), DD::Image::Box::x(), and DD::Image::Box::y().
double OutputContext::to_proxy_pixel_aspect | ( | double | pa | ) | const [inline] |
Convert a pixel aspect. I.e if an image with pixel aspect of pa is rescaled by the proxy scaling, it's pixel aspect will be this.
void OutputContext::from_proxy | ( | Matrix4 & | m | ) | const |
Multiply the matrix by the transformation from proxy space to full-size space. If the matrix was the identity, it will now be a transform from proxy to full-size;
References DD::Image::Matrix4::scale(), and DD::Image::Matrix4::translate().
void OutputContext::from_proxy_xy | ( | double & | x, | |
double & | y | |||
) | const [inline] |
Transform an xy position from proxy space to full size.
Referenced by DD::Image::Read::_validate(), and DD::Image::Read::append().
void OutputContext::from_proxy_wh | ( | double & | w, | |
double & | h | |||
) | const [inline] |
Transform a vector/distance from proxy space to full size. This is different than from_proxy_xy if there is a translation of the origin.
Referenced by DD::Image::Read::_validate(), and DD::Image::Read::append().
double OutputContext::from_proxy_area | ( | double | area | ) | const [inline] |
Return the area of a shape of the given area when converted from proxy space to full size.
void OutputContext::append | ( | Hash & | hash | ) | const |
Add the contents of this to the hash, thus producing a different hash for any different setting of OutputContext.
References DD::Image::Hash::append().
©2009 The Foundry Visionmongers, Ltd. All Rights Reserved. |