37 float view_left, view_top, view_width, view_height;
40 unsigned int max_resolutions;
41 unsigned int left, top, width, height;
42 unsigned int min_size;
43 unsigned int max_size;
44 unsigned int requested_width;
45 unsigned int requested_height;
54 void calculateResolution(
unsigned int m,
unsigned int r );
69 resolution = 0; max_resolutions = 0; min_size = 8; max_size = 0;
70 width = 0; height = 0;
71 view_left = 0.0; view_top = 0.0; view_width = 1.0; view_height = 1.0;
72 requested_width = 0; requested_height = 0;
74 xangle = 0; yangle = 90;
75 shaded =
false; shade[0] = 0; shade[1] = 0; shade[2] = 0;
76 max_layers = 0; layers = 0;
97 if( requested_width == 0 && requested_height > 0 ){
98 requested_width =
static_cast<unsigned int>( width * requested_height / height );
100 if( requested_width > width ) requested_width = width;
101 if( requested_width > max_size ) requested_width = max_size;
103 if( requested_width <= 0 ) requested_width = width;
104 return requested_width;
111 if( w < max_size ) requested_width = w;
112 else requested_width = max_size;
118 if( requested_height == 0 && requested_width > 0 ){
119 requested_height =
static_cast<unsigned int>( height * requested_width / width );
121 if( requested_height > height ) requested_height = height;
122 if( requested_height > max_size ) requested_height = max_size;
124 if( requested_height <= 0 ) requested_height = height;
125 return requested_height;
131 if( h < max_size ) requested_height = h;
132 else requested_height = max_size;
168 void setImageSize(
unsigned int w,
unsigned int h ){ width = w; height = h; };
void setViewHeight(float h)
Set the height co-ordinate of the viewport.
void setImageSize(unsigned int w, unsigned int h)
Set the source image pixel size.
Definition: View.h:168
bool shaded
Vertical View.
Definition: View.h:61
unsigned int getViewTop()
Return the top pixel of the viewport.
void setContrast(float c)
Set the contrast adjustment.
Definition: View.h:82
int shade[3]
Whether to use shading view.
Definition: View.h:62
void setViewLeft(float x)
Set the left co-ordinate of the viewport.
void setLayers(int l)
Set the number of quality layers to decode, limiting to our max value.
Definition: View.h:177
void setViewWidth(float w)
Set the width co-ordinate of the viewport.
unsigned int getViewWidth()
Return the pixel width of the viewport.
unsigned int getResolution()
Return the requested resolution.
float getScale()
Return the scaling required in case our requested width or height is in between available resolutions...
int yangle
Horizontal View.
Definition: View.h:60
unsigned int getLayers()
Return the number of layers to decode.
Definition: View.h:180
void setMaxSize(unsigned int m)
Set the maximum view port dimension.
Definition: View.h:87
unsigned int getImageHeight()
Return the image height at our requested resolution.
Definition: View.h:189
View()
Number of quality layers.
Definition: View.h:68
bool viewPortSet()
Indicate whether the viewport has been set.
Class to intelligently handle Image Transforms.
Definition: View.h:31
unsigned int getViewLeft()
Return the left pixel of the viewport.
unsigned int getImageWidth()
Return the image width at our requested resolution.
Definition: View.h:186
float getContrast()
Return the contrast adjustment.
Definition: View.h:183
unsigned int getRequestHeight()
Get the size of the requested height.
Definition: View.h:117
unsigned int getRequestWidth()
Get the size of the requested width.
Definition: View.h:96
unsigned int getViewHeight()
Return the pixel height of the viewport.
void setViewTop(float y)
Set the top co-ordinate of the viewport.
void setMaxLayers(int l)
Limit the maximum number of quality layers we are allowed to decode.
Definition: View.h:173
void setRequestWidth(unsigned int w)
Set the size of the requested width.
Definition: View.h:110
int layers
Maximum number of quality layers allowed.
Definition: View.h:64
void setMaxResolutions(unsigned int r)
Set the maximum view port dimension.
Definition: View.h:92
void setRequestHeight(unsigned int h)
Set the size of the requested height.
Definition: View.h:130
int max_layers
Shading incident light angles (x,y,z)
Definition: View.h:63