#include <CAUGuiMoreImages.h>
Inheritance diagram for CAUGuiHandleImage:

Public Member Functions | |
| CAUGuiHandleImage (char *pngFileName, SInt32 pivotOffsetX, SInt32 pivotOffsetY) | |
| constructor for a CAUGuiHandleImage | |
| virtual | ~CAUGuiHandleImage () |
| destructor | |
| virtual void | draw (CGContextRef context, UInt32 portHeight, eRect *rect, float value) |
| letting Graphics draw themselves | |
This type of image can be used for faders, switches, peak meters etc.
It scales itself proportional to fit in the foreBounds of the Control object it is attached to. Naturally, when doing this, there's still room inside the area in either horizontal or vertical direction. The image will then traverse along that direction according to the _normalized_ value passed.
Note that the position is determined from the Pivot (default: center of image), so on maximom values this image will draw itself with one half out of the bounds of the foreground area passed.
Example given:
Your image is 30x20 pixels
Your control passes an eRect (foreground Bounds, member "vizArea") that is 100 pixels wide and 10 pixels high
The CAUGuiHandleImage object will the scale the image to 15x10 pixels.
On value 0.0f it will be drawn with its center at x = 0, y = 5 of your foreBounds, hence exceed the bounds on the left side about 7 pixels!
Hence, if your Parameter has 100 values, each pixel represents an integer step.
So, take care how you shrink your Slider's foreBounds. Once you get that, it's easy.
Definition at line 113 of file CAUGuiMoreImages.h.
|
||||||||||||||||
|
constructor for a CAUGuiHandleImage
Definition at line 107 of file CAUGuiMoreImages.cpp. |
|
|
destructor
Definition at line 128 of file CAUGuiMoreImages.h. |
|
||||||||||||||||||||
|
letting Graphics draw themselves
Reimplemented from CAUGuiGraphic. Definition at line 121 of file CAUGuiMoreImages.cpp. References CAUGuiGraphic::getHeight(), CAUGuiGraphic::getImage(), CAUGuiGraphic::getWidth(), eRect::h, eRect::offset(), eRect::set(), eRect::to(), and eRect::w. |
| (c) 2002 - 2003 by Urs Heckmann www.u-he.com |
1.3.6