#include <assert.h>
#include <GL/glut.h>
#include "../image/imagergba.h"
Go to the source code of this file.
Functions | |
void | keyboardCB (unsigned char key, float x, float y) |
Keyboard callback-function. | |
void | specialCB (int key, float x, float y) |
Special-key keyboard callback-function. | |
void | mouseCB (int button, int state, float x, float y) |
Mouse button callback-function. | |
void | motionCB (float x, float y) |
Mouse motion callback-function. | |
void | idleCB (void) |
Idle callback-function. | |
void | fwkInit (int *argc, const char *argv[]) |
Initializes the exercise framework. | |
void | fwkMainLoop (void) |
Starts the application main-loop. | |
void | fwkSetDisplayImage (const void *img) |
Sets the currently displayed image. | |
float | fwkGetDisplayZoom (void) |
Gets the current zoom factor. | |
void | fwkSetDisplayZoom (float zoom) |
Sets the current zoom factor. | |
void | fwkPostRedisplay (void) |
Requests a redraw of the displayed image. |
|
Gets the current zoom factor.
Definition at line 410 of file framewk.cpp. References displayZoom. Referenced by keyboardCB(), and effect::useMenu(). |
|
Initializes the exercise framework. Initializes GLUT and opens a GLUT window. See pgdocFramework for more details.
Definition at line 342 of file framewk.cpp. References fwkKeyboardCB(), fwkMotionCB(), fwkMouseCB(), fwkPassiveMotionCB(), fwkRedrawCB(), fwkSpecialCB(), and glutWindowId. Referenced by main(). |
|
Starts the application main-loop. (Actually starts the GLUT main-loop.) See pgdocFramework for more details. Definition at line 379 of file framewk.cpp. Referenced by main(). |
|
Requests a redraw of the displayed image. Call this function if the image content has changed. Subsequent calls to fwkPostRedisplay() are cumulated. See fwUsageImageData for more details. Definition at line 446 of file framewk.cpp. References displayChanged. Referenced by idleCB(). |
|
Sets the currently displayed image. img can be a pointer to an ImageGray or ImageRGBA struct, as well. If img was not displayed before, a fwkPostRedisplay() is implicitly called. See fwUsageImageData for more details.
Definition at line 390 of file framewk.cpp. References glutWindowId. Referenced by scroll::idleAction(), main(), and effect::refreshImage(). |
|
Sets the current zoom factor.
Definition at line 415 of file framewk.cpp. References displayZoom, and fwkPostRedisplayNoChange(). Referenced by keyboardCB(), and effect::useMenu(). |
|
Idle callback-function.
Definition at line 114 of file painter.cpp. References fwkPostRedisplay(), effect::idle(), and effect::inAction. |
|
Keyboard callback-function.
Definition at line 41 of file painter.cpp. References fwkGetDisplayZoom(), fwkSetDisplayZoom(), imageRgbaCopy(), imageRgbaWriteTIFF(), effect::img, effect::inAction, effect::key(), resetImage(), effect::setXY(), effect::temp, and effect::temp2. Referenced by fwkKeyboardCB(). |
|
Mouse motion callback-function.
Definition at line 107 of file painter.cpp. References effect::inAction, effect::move(), and effect::setXY(). Referenced by fwkMotionCB(). |
|
Mouse button callback-function.
Definition at line 97 of file painter.cpp. References effect::LB(), effect::RB(), and effect::setXY(). Referenced by fwkMouseCB(). |
|
Special-key keyboard callback-function.
Definition at line 90 of file painter.cpp. References effect::inAction, effect::setXY(), and effect::specialKey(). Referenced by fwkSpecialCB(). |