22 if (!dasharray.empty())
24 std::vector<unsigned int>::const_iterator it = dasharray.begin(), endit = dasharray.end();
36 unsigned int exponent = (
unsigned int)ceil(log((
double)this->
mPatternLength) / log(2.0));
44 glTexImage1D(GL_PROXY_TEXTURE_1D, 0, GL_ALPHA, this->
mTextureLength, 0, GL_ALPHA, GL_UNSIGNED_BYTE, NULL);
45 glGetTexLevelParameteriv(GL_PROXY_TEXTURE_1D, 0, GL_TEXTURE_WIDTH, &w);
51 it = dasharray.begin();
54 unsigned int index = 0;
58 for (i = 0; i < *it; ++i)
61 pTextureData[index] = gap ? 0 : 255;
72 pTextureData[index++] = 70;
80 glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
81 glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
82 glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_REPEAT);
83 glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
84 glTexImage1D(GL_TEXTURE_1D, 0, GL_ALPHA, this->mTextureLength, 0, GL_ALPHA, GL_UNSIGNED_BYTE, pTextureData);
86 delete[] pTextureData;
90 std::cerr <<
"Line stipple texture of this size is not supported by the current OpenGL implementation." << std::endl;
95 std::cerr <<
"texture to large." << std::endl;
135 mFontFamily(
"sans-serif"),
137 mFontWeight(
CLText::WEIGHT_NORMAL),
138 mFontStyle(
CLText::STYLE_NORMAL),
139 mTextAnchor(
CLText::ANCHOR_START),
140 mVTextAnchor(
CLText::ANCHOR_TOP),
168 mStroke(src.mStroke),
169 mStrokeWidth(src.mStrokeWidth),
170 mStrokeDasharray(src.mStrokeDasharray),
173 mFillRule(src.mFillRule),
174 mFontFamily(src.mFontFamily),
175 mFontSize(src.mFontSize),
176 mFontWeight(src.mFontWeight),
177 mFontStyle(src.mFontStyle),
178 mTextAnchor(src.mTextAnchor),
179 mVTextAnchor(src.mVTextAnchor),
180 mStartHead(src.mStartHead),
181 mEndHead(src.mEndHead),
233 mWeight(
CLText::WEIGHT_UNSET),
234 mStyle(
CLText::STYLE_UNSET)
const C_FLOAT64 & getWidth() const
const CLBoundingBox & getBoundingBox() const
CLText::TEXT_ANCHOR mTextAnchor
unsigned int mPatternLength
CLText::FONT_STYLE mFontStyle
bool operator()(const CLGraphicalObject *pObject1, const CLGraphicalObject *pObject2) const
const CLDimensions & getDimensions() const
std::vector< unsigned int > mStrokeDasharray
CLGraphicalPrimitive2D::FILL_RULE mFillRule
CLLineStippleTexture(const std::vector< unsigned int > &dasharray)
const C_FLOAT64 & getHeight() const
CLGroupAttributes & operator=(const CLGroupAttributes &src)
unsigned int mTextureLength
CLText::FONT_WEIGHT mWeight
CLText::TEXT_ANCHOR mVTextAnchor
CLText::FONT_WEIGHT mFontWeight
bool operator<(const CLFontSpec &right) const
const CLCurve & getCurve() const
size_t getNumCurveSegments() const
CLText::FONT_STYLE mStyle