| 579 | } |
| 580 | |
| 581 | void OglRenderer::renderGlyphs(double x, double y, colorObj *color, |
| 582 | colorObj *outlinecolor, double size, char* font, char *thechars, double angle, |
| 583 | colorObj *shadowcolor, double shdx, double shdy) |
| 584 | { |
| 585 | makeCurrent(); |
| 586 | FTFont* face = getFTFont(font, size); |
| 587 | if (!face) |
| 588 | { |
| 589 | msSetError(MS_OGLERR, "Failed to load font (%s).", "OglRenderer::renderGlyphs()", font); |
| 590 | return; |
| 591 | } |
| 592 | |
| 593 | glPushAttrib(GL_ALL_ATTRIB_BITS); |
| 594 | glPushMatrix(); |
| 595 | |
| 596 | glTranslated(floor(x), floor(y), 0); |
| 597 | glScaled(1.0, -1.0, 1); |
| 598 | glRotated(angle * (180 / OGL_PI), 0, 0, 1); |
| 599 | |
| 600 | if (outlinecolor && MS_VALID_COLOR(*outlinecolor)) |
| 601 | { |
| 602 | setColor(outlinecolor); |
| 603 | for (int i = -1; i <= 1; i++) |
| 604 | { |
| 605 | for (int j = -1; j <= 1; j++) |
| 606 | { |
| 607 | if (i || j) |
| 608 | { |
| 609 | glPushMatrix(); |
| 610 | glTranslated(i, j, 0); |
| 611 | face->Render(thechars); |
| 612 | glPopMatrix(); |
| 613 | } |
| 614 | } |
| 615 | } |
| 616 | } |
| 617 | if (color != NULL && MS_VALID_COLOR(*color)) |
| 618 | { |
| 619 | setColor(color); |
| 620 | face->Render(thechars); |
| 621 | } |
| 622 | |
| 623 | glPopMatrix(); |
| 624 | glPopAttrib(); |
| 625 | } |
| 626 | |
| 627 | void OglRenderer::renderPixmap(symbolObj *symbol, double x, double y, |
| 628 | double angle, double scale) |
no test coverage detected