USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::ViewportBufferTransform Class Reference

#include <ViewportBufferTransform.h>

Inheritance diagram for Isis::ViewportBufferTransform:
Inheritance graph
Collaboration diagram for Isis::ViewportBufferTransform:
Collaboration graph

Public Types

enum  ActionType { none, transform, fill, stretch }
 This uniquely identifies which child is instantiated. More...

Public Member Functions

 ViewportBufferTransform ()
 Constructor.
virtual ActionType getActionType ()
 Returns the instance type.
void setTranslation (int x, int y)
 Sets the translation amount in x and y.
int getXTranslation ()
 Gets the amount the buffer should be translated in X.
int getYTranslation ()
 Gets the amount the buffer should be translated in Y.
void setResize (int width, int height)
 Sets the size the buffer should be resized to.
const int & getBufferWidth ()
 Returns the new buffer width.
const int & getBufferHeight ()
 Returns the new buffer height.
bool resizeFirst ()
 Returns true if the resize should happen before the translation.
void resizeFirst (bool resizeFirst)
 Sets whether the resize should happen before the translation.
bool started ()
 Returns true if this is an action that takes time and has begun.
void started (bool started)
 Sets started.
virtual void stop ()
 Cancels the process, used if reinitialize requested for example.

Private Attributes

int p_xTranslation
 How far to translate in X.
int p_yTranslation
 How far to translate in Y.
int p_newBufferWidth
 New width.
int p_newBufferHeight
 New height.
bool p_resizeFirst
 Do the resize before the translation?

Detailed Description

Author
????-??-?? Unknown

Definition at line 14 of file ViewportBufferTransform.h.

Member Enumeration Documentation

This uniquely identifies which child is instantiated.

Enumerator:
none 

Parent was instantiated.

transform 

ViewportBufferTransform.

fill 

ViewportBufferFill.

stretch 

ViewportBufferStretch.

Definition at line 19 of file ViewportBufferAction.h.

Constructor & Destructor Documentation

Isis::ViewportBufferTransform::ViewportBufferTransform ( )

Constructor.

Definition at line 10 of file ViewportBufferTransform.cpp.

References p_newBufferHeight, p_newBufferWidth, p_resizeFirst, p_xTranslation, and p_yTranslation.

Member Function Documentation

virtual ActionType Isis::ViewportBufferTransform::getActionType ( )
inlinevirtual

Returns the instance type.

Reimplemented from Isis::ViewportBufferAction.

Definition at line 19 of file ViewportBufferTransform.h.

References Isis::ViewportBufferAction::transform.

const int& Isis::ViewportBufferTransform::getBufferHeight ( )
inline
const int& Isis::ViewportBufferTransform::getBufferWidth ( )
inline
int Isis::ViewportBufferTransform::getXTranslation ( )
inline

Gets the amount the buffer should be translated in X.

Returns
int

Definition at line 30 of file ViewportBufferTransform.h.

References p_xTranslation.

Referenced by Isis::ViewportBuffer::actionsPreserveData(), and Isis::ViewportBuffer::doTransformAction().

int Isis::ViewportBufferTransform::getYTranslation ( )
inline

Gets the amount the buffer should be translated in Y.

Returns
int

Definition at line 40 of file ViewportBufferTransform.h.

References p_yTranslation.

Referenced by Isis::ViewportBuffer::actionsPreserveData(), and Isis::ViewportBuffer::doTransformAction().

bool Isis::ViewportBufferTransform::resizeFirst ( )
inline

Returns true if the resize should happen before the translation.

Returns
bool

Definition at line 70 of file ViewportBufferTransform.h.

References p_resizeFirst.

Referenced by Isis::ViewportBuffer::actionsPreserveData(), Isis::ViewportBuffer::doTransformAction(), Isis::ViewportBuffer::pan(), Isis::ViewportBuffer::resizedViewport(), and resizeFirst().

void Isis::ViewportBufferTransform::resizeFirst ( bool  resizeFirst)
inline

Sets whether the resize should happen before the translation.

Parameters
resizeFirst

Definition at line 79 of file ViewportBufferTransform.h.

References p_resizeFirst, and resizeFirst().

void Isis::ViewportBufferTransform::setResize ( int  width,
int  height 
)

Sets the size the buffer should be resized to.

Parameters
width
height

Definition at line 36 of file ViewportBufferTransform.cpp.

References p_newBufferHeight, and p_newBufferWidth.

Referenced by Isis::ViewportBuffer::pan(), Isis::ViewportBuffer::reinitialize(), and Isis::ViewportBuffer::resizedViewport().

void Isis::ViewportBufferTransform::setTranslation ( int  x,
int  y 
)

Sets the translation amount in x and y.

Parameters
x
y

Definition at line 24 of file ViewportBufferTransform.cpp.

References p_xTranslation, and p_yTranslation.

Referenced by Isis::ViewportBuffer::pan(), and Isis::ViewportBuffer::resizedViewport().

bool Isis::ViewportBufferAction::started ( )
inlineinherited
void Isis::ViewportBufferAction::started ( bool  started)
inlineinherited

Sets started.

Parameters
startedTrue if starting

Definition at line 41 of file ViewportBufferAction.h.

References Isis::ViewportBufferAction::p_started, and Isis::ViewportBufferAction::started().

virtual void Isis::ViewportBufferAction::stop ( )
inlinevirtualinherited

Cancels the process, used if reinitialize requested for example.

Reimplemented in Isis::ViewportBufferFill.

Definition at line 46 of file ViewportBufferAction.h.

Member Data Documentation

int Isis::ViewportBufferTransform::p_newBufferHeight
private

New height.

Definition at line 88 of file ViewportBufferTransform.h.

Referenced by getBufferHeight(), setResize(), and ViewportBufferTransform().

int Isis::ViewportBufferTransform::p_newBufferWidth
private

New width.

Definition at line 87 of file ViewportBufferTransform.h.

Referenced by getBufferWidth(), setResize(), and ViewportBufferTransform().

bool Isis::ViewportBufferTransform::p_resizeFirst
private

Do the resize before the translation?

Definition at line 89 of file ViewportBufferTransform.h.

Referenced by resizeFirst(), and ViewportBufferTransform().

int Isis::ViewportBufferTransform::p_xTranslation
private

How far to translate in X.

Definition at line 85 of file ViewportBufferTransform.h.

Referenced by getXTranslation(), setTranslation(), and ViewportBufferTransform().

int Isis::ViewportBufferTransform::p_yTranslation
private

How far to translate in Y.

Definition at line 86 of file ViewportBufferTransform.h.

Referenced by getYTranslation(), setTranslation(), and ViewportBufferTransform().


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