#include <dsp.h>
Public Member Functions | |
The basic graphics system used to display primitives is the "CD - Canvas Drawing". Please refer to CD documentation for additional information. See specification of public functions of this module in hearder file "dsp.h", which also contains code color definitions. Revisions:
| |
| Dsp (cdCanvas *canvas) | |
| This function creates a new the display module. | |
| virtual | ~Dsp () |
| This function deletes a display module. | |
| void | Window (double scale, double *xmin, double *xmax, double *ymin, double *ymax) |
| This function adjusts the given window limits according to the given scaling factor. | |
| void | PanWindow (double dx, double dy, double *xmin, double *xmax, double *ymin, double *ymax) |
| This function shifts the given window limits according to the given pan (displacement) factors. | |
| void | PanDragWindowStart (double x, double y) |
| This function and the function below are used to pan (translate) interactively the visualization window. | |
| void | PanDragWindowMove (double x, double y, double *xmin, double *xmax, double *ymin, double *ymax) |
| This function should be called when there is an event of mouse-move, while the mouse button is pressed or when it is released, during an interactive pan manipulation of the visualization window. | |
| void | XorMode (int on) |
| This function sets on or off XOR mode display. | |
Static Public Attributes | |
| static const long int | BACKGROUND_COLOR = 0xC0C0C0L |
| Defines gray as background color. | |
| static const long int | WHITE = 0xFFFFFFL |
| Some predefined RGB color codes for convenience (stolen from CD graphics system):. | |
| static const long int | GRAY = 0xC0C0C0L |
| static const long int | DARK_GRAY = 0x808080L |
| static const long int | BLACK = 0x000000L |
| static const long int | RED = 0xFF0000L |
| static const long int | DARK_RED = 0x800000L |
| static const long int | GREEN = 0x00FF00L |
| static const long int | DARK_GREEN = 0x008000L |
| static const long int | BLUE = 0x0000FFL |
| static const long int | DARK_BLUE = 0x000080L |
| static const long int | YELLOW = 0xFFFF00L |
| static const long int | DARK_YELLOW = 0x808000L |
| static const long int | MAGENTA = 0xFF00FFL |
| static const long int | DARK_MAGENTA = 0x800080L |
| static const long int | CYAN = 0x00FFFFL |
| static const long int | DARK_CYAN = 0x008080L |
Protected Attributes | |
| cdCanvas * | Gdatascreen |
| CD handle to data canvas. | |
| double | curr_mousept_x |
| Current mouse position for a mouse-move event. | |
| double | curr_mousept_y |
| Current mouse position for a mouse-move event. | |
|
|
This function creates a new the display module. It sets the background color of the current color: light gray.
Definition at line 53 of file dsp.cpp. References BACKGROUND_COLOR, and Gdatascreen. |
|
|
This function deletes a display module. It does everything is necessary to close the visualization part of this program. Currently nothing is done. |
|
||||||||||||||||||||||||||||
|
This function should be called when there is an event of mouse-move, while the mouse button is pressed or when it is released, during an interactive pan manipulation of the visualization window. The translation parameters used to drag the window are computed based on the previous mouse point location and on the given point location. The given point location is updated as a current point for the next mouse move call.
Definition at line 149 of file dsp.cpp. References curr_mousept_x, curr_mousept_y, and PanWindow(). Referenced by Prj::MouseButtonDrag(), and Prj::MouseButtonRelease(). |
|
||||||||||||
|
This function and the function below are used to pan (translate) interactively the visualization window. The present one should be called when there is an event of mouse button-press. The location where this event occur is used as a current point to compute the window translation vector.
Definition at line 137 of file dsp.cpp. References curr_mousept_x, and curr_mousept_y. Referenced by Prj::MouseButtonPress(). |
|
||||||||||||||||||||||||||||
|
This function shifts the given window limits according to the given pan (displacement) factors. A negative horizontal displacement will result in a shift to the right of the displayed objects in the canvas viewport. A positive horizontal displacement will result in a shift to the left. A negative vertical displacement will result in a upward shift and a positive vertical displacement in a downward shift.
Definition at line 117 of file dsp.cpp. References Gdatascreen. Referenced by Prj::PanDown(), PanDragWindowMove(), Prj::PanLeft(), Prj::PanRight(), and Prj::PanUp(). |
|
||||||||||||||||||||||||
|
This function adjusts the given window limits according to the given scaling factor. A factor less than one indicates that the window will be decreased, and the result is that the displayed objects will appear bigger in the canvas viewport. A factor greater than one will result in smaller displayed objects in the canvas viewport. The limits are adjusted to be consistent with the current active canvas viewport aspect ratio. The adjustment is such that the center of the given window is maintained.
Definition at line 68 of file dsp.cpp. References Gdatascreen. Referenced by Prj::Fit(), Prj::Help(), Prj::OpenModel(), Prj::Prj(), Prj::Reset(), Prj::Resize(), Prj::ZoomFactor(), Prj::ZoomIn(), and Prj::ZoomOut(). |
|
|
This function sets on or off XOR mode display.
Definition at line 173 of file dsp.cpp. References Gdatascreen. Referenced by PrmEd::DspTmpPrmLines(). |
|
|
Defines gray as background color.
Definition at line 50 of file dsp.h. Referenced by Dsp(). |
|
|
Definition at line 58 of file dsp.h. Referenced by drvKeyCrtl(), PrmIO::GetColorCode(), and Prj::Help(). |
|
|
Definition at line 63 of file dsp.h. Referenced by drvKeyCrtl(), and PrmIO::GetColorCode(). |
|
|
Current mouse position for a mouse-move event.
Definition at line 84 of file dsp.h. Referenced by PanDragWindowMove(), and PanDragWindowStart(). |
|
|
Current mouse position for a mouse-move event.
Definition at line 84 of file dsp.h. Referenced by PanDragWindowMove(), and PanDragWindowStart(). |
|
|
Definition at line 69 of file dsp.h. Referenced by drvKeyCrtl(), and PrmIO::GetColorCode(). |
|
|
Definition at line 64 of file dsp.h. Referenced by drvKeyCrtl(), and PrmIO::GetColorCode(). |
|
|
Definition at line 70 of file dsp.h. Referenced by drvKeyCrtl(), and PrmIO::GetColorCode(). |
|
|
Definition at line 57 of file dsp.h. Referenced by PrmIO::GetColorCode(). |
|
|
Definition at line 62 of file dsp.h. Referenced by drvKeyCrtl(), and PrmIO::GetColorCode(). |
|
|
Definition at line 68 of file dsp.h. Referenced by drvKeyCrtl(), and PrmIO::GetColorCode(). |
|
|
Definition at line 60 of file dsp.h. Referenced by drvKeyCrtl(), and PrmIO::GetColorCode(). |
|
|
Definition at line 66 of file dsp.h. Referenced by drvKeyCrtl(), and PrmIO::GetColorCode(). |
|
|
CD handle to data canvas.
Definition at line 80 of file dsp.h. Referenced by Dsp(), PanWindow(), Window(), and XorMode(). |
|
|
Definition at line 56 of file dsp.h. Referenced by PrmIO::GetColorCode(). |
|
|
Definition at line 61 of file dsp.h. Referenced by drvKeyCrtl(), and PrmIO::GetColorCode(). |
|
|
Definition at line 67 of file dsp.h. Referenced by drvKeyCrtl(), and PrmIO::GetColorCode(). |
|
|
Definition at line 59 of file dsp.h. Referenced by drvKeyCrtl(), and PrmIO::GetColorCode(). |
|
|
Some predefined RGB color codes for convenience (stolen from CD graphics system):.
Definition at line 55 of file dsp.h. Referenced by drvKeyCrtl(), PrmIO::GetColorCode(), and PrmEd::ResetParams(). |
|
|
Definition at line 65 of file dsp.h. Referenced by drvKeyCrtl(), and PrmIO::GetColorCode(). |
1.4.2-20050421