|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//-----------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
// drawutil.h:
|
|
Toshihiro Shimizu |
890ddd |
// Private header to common fuction in drawcurves.cpp and drawregions.cpp
|
|
Toshihiro Shimizu |
890ddd |
//-----------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef DRAWUTIL_H
|
|
Toshihiro Shimizu |
890ddd |
#define DRAWUTIL_H
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "tgl.h"
|
|
Toshihiro Shimizu |
890ddd |
//#include "traster.h"
|
|
Toshihiro Shimizu |
890ddd |
//#include "tcurves.h"
|
|
Toshihiro Shimizu |
890ddd |
//#include "tregion.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
class TRegion;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#undef DVAPI
|
|
Toshihiro Shimizu |
890ddd |
#undef DVVAR
|
|
Toshihiro Shimizu |
890ddd |
#ifdef TVECTORIMAGE_EXPORTS
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_EXPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_EXPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#else
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_IMPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_IMPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//=============================================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//! structure with information about texture to create
|
|
Toshihiro Shimizu |
890ddd |
struct TextureInfoForGL {
|
|
Toshihiro Shimizu |
890ddd |
// GLenum target,
|
|
Toshihiro Shimizu |
890ddd |
// GLint level,
|
|
Toshihiro Shimizu |
890ddd |
GLint internalformat;
|
|
Toshihiro Shimizu |
890ddd |
GLsizei width;
|
|
Toshihiro Shimizu |
890ddd |
GLsizei height;
|
|
Toshihiro Shimizu |
890ddd |
// GLint border,
|
|
Toshihiro Shimizu |
890ddd |
GLenum format;
|
|
Toshihiro Shimizu |
890ddd |
GLenum type;
|
|
Toshihiro Shimizu |
890ddd |
const GLvoid *pixels;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//=============================================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/**
|
|
Toshihiro Shimizu |
890ddd |
*
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
DVAPI TRasterP prepareTexture(const TRasterP &ras,
|
|
Toshihiro Shimizu |
890ddd |
TextureInfoForGL &texinfo);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/**
|
|
Toshihiro Shimizu |
890ddd |
*
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
DVAPI double computeStep(const TStroke &s,
|
|
Toshihiro Shimizu |
890ddd |
double pixelSize);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/**
|
|
Toshihiro Shimizu |
890ddd |
* Draw stroke centerline between parameters from and to.
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
DVAPI void drawStrokeCenterline(const TStroke &stroke,
|
|
Toshihiro Shimizu |
890ddd |
double pixelSize,
|
|
Toshihiro Shimizu |
890ddd |
double from = 0.0,
|
|
Toshihiro Shimizu |
890ddd |
double to = 1.0);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
3bfa54 |
DVAPI void stroke2polyline(std::vector<tpointd> &pnts,</tpointd>
|
|
Toshihiro Shimizu |
890ddd |
const TStroke &stroke,
|
|
Toshihiro Shimizu |
890ddd |
double pixelSize,
|
|
Toshihiro Shimizu |
890ddd |
double w0 = 0.0,
|
|
Toshihiro Shimizu |
890ddd |
double w1 = 1.0,
|
|
Toshihiro Shimizu |
890ddd |
bool lastRepeatable = false);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
3bfa54 |
DVAPI void region2polyline(std::vector<t3dpointd> &pnts,</t3dpointd>
|
|
Toshihiro Shimizu |
890ddd |
const TRegion *region,
|
|
Toshihiro Shimizu |
890ddd |
double pixeSize);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
DVAPI TStroke *makeEllipticStroke(double thick,
|
|
Toshihiro Shimizu |
890ddd |
TPointD center,
|
|
Toshihiro Shimizu |
890ddd |
double radiusX,
|
|
Toshihiro Shimizu |
890ddd |
double radiusY);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#endif // DRAWUTIL_H
|
|
Toshihiro Shimizu |
890ddd |
//-----------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
// End Of File
|
|
Toshihiro Shimizu |
890ddd |
//-----------------------------------------------------------------------------
|