|
Shinya Kitaoka |
810553 |
#pragma once
|
|
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 {
|
|
Shinya Kitaoka |
120a6e |
// GLenum target,
|
|
Shinya Kitaoka |
120a6e |
// GLint level,
|
|
Shinya Kitaoka |
120a6e |
GLint internalformat;
|
|
Shinya Kitaoka |
120a6e |
GLsizei width;
|
|
Shinya Kitaoka |
120a6e |
GLsizei height;
|
|
Shinya Kitaoka |
120a6e |
// GLint border,
|
|
Shinya Kitaoka |
120a6e |
GLenum format;
|
|
Shinya Kitaoka |
120a6e |
GLenum type;
|
|
Shinya Kitaoka |
120a6e |
const GLvoid *pixels;
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//=============================================================================
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/**
|
|
Toshihiro Shimizu |
890ddd |
*
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Shinya Kitaoka |
120a6e |
DVAPI TRasterP prepareTexture(const TRasterP &ras, TextureInfoForGL &texinfo);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/**
|
|
Toshihiro Shimizu |
890ddd |
*
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Shinya Kitaoka |
120a6e |
DVAPI double computeStep(const TStroke &s, double pixelSize);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/**
|
|
Toshihiro Shimizu |
890ddd |
* Draw stroke centerline between parameters from and to.
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Shinya Kitaoka |
120a6e |
DVAPI void drawStrokeCenterline(const TStroke &stroke, double pixelSize,
|
|
Shinya Kitaoka |
120a6e |
double from = 0.0, double to = 1.0);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
DVAPI void stroke2polyline(std::vector<tpointd> &pnts, const TStroke &stroke,</tpointd>
|
|
Shinya Kitaoka |
120a6e |
double pixelSize, double w0 = 0.0, double w1 = 1.0,
|
|
Shinya Kitaoka |
120a6e |
bool lastRepeatable = false);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
DVAPI void region2polyline(std::vector<t3dpointd> &pnts, const TRegion *region,</t3dpointd>
|
|
Shinya Kitaoka |
120a6e |
double pixeSize);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
DVAPI TStroke *makeEllipticStroke(double thick, TPointD center, double radiusX,
|
|
Shinya Kitaoka |
120a6e |
double radiusY);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
#endif // DRAWUTIL_H
|
|
Toshihiro Shimizu |
890ddd |
//-----------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
// End Of File
|
|
Toshihiro Shimizu |
890ddd |
//-----------------------------------------------------------------------------
|