SUMO - Simulation of Urban MObility
|
#include <config.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <GL/gl.h>
#include "polyfonts.h"
#include "pfPSansBold16.h"
Go to the source code of this file.
Data Structures | |
struct | nameValue |
struct | vertex |
Macros | |
#define | abs(a) (((a)<0) ? -(a) : (a)) |
#define | DtoR (PI/180.0) |
#define | max(a, b) (((a) > (b)) ? (a) : (b)) |
#define | min(a, b) (((a) < (b)) ? (a) : (b)) |
#define | numWeights (sizeof(weightOffset) / sizeof(vertex)) |
#define | PI (3.1415926535897932384626433) |
#define | RtoD (180.0/PI) |
#define | sign(a) (((a)<0) ? -1 : (a)>0 ? 1 : 0) |
#define | unfix(value) ((SUMOReal)(value)) / ((SUMOReal)pfFixScale) |
Variables | |
static nameValue | glPrims [] |
static int | pfCenter = 0 |
static pffont * | pfCurrentFont = &pfPSansBold16 |
static pffont * | pfDefaultFont = &pfPSansBold16 |
static SUMOReal | pfScaleX = 20.0 |
static SUMOReal | pfScaleY = 20.0 |
static SUMOReal | pfTextCos = 1.0 |
static SUMOReal | pfTextSin = 0.0 |
static SUMOReal | pfTextSkew = 0.0 |
static int | pfTextWeight = 1 |
static SUMOReal | pfTextX = 0.0 |
static SUMOReal | pfTextY = 0.0 |
vertex | weightOffset [] |
#define abs | ( | a | ) | (((a)<0) ? -(a) : (a)) |
Definition at line 63 of file polyfonts.c.
Referenced by MSLCM_DK2004::currentDistAllows(), MSLCM_DK2004::currentDistDisallows(), AGCity::generatePopulation(), MSVehicle::getBestLanes(), and NBNode::getDirection().
#define DtoR (PI/180.0) |
Definition at line 59 of file polyfonts.c.
Referenced by pfSetAngleD().
#define max | ( | a, | |
b | |||
) | (((a) > (b)) ? (a) : (b)) |
Definition at line 61 of file polyfonts.c.
Referenced by TplConvert::_2int(), TplConvert::_hex2int(), TraCIServerAPI_Vehicle::commandDistanceRequest(), DijkstraRouterEffortBase< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::compute(), DijkstraRouterTTBase< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::compute(), AStarRouterTTBase< MSEdge, SUMOVehicle, prohibited_withRestrictions< MSEdge, SUMOVehicle > >::compute(), computeRoutes(), TraCIServerAPI_Simulation::convertCartesianToRoadMap(), PositionVector::distance(), MSLaneChanger::findCandidate(), ROGawronCalculator::gawronF(), ROGawronCalculator::gawronG(), ROLogitCalculator::getBetaForCLogit(), MSRoute::getDistanceBetween(), MSVehicle::getDistanceToPosition(), RODFDetectorFlows::getMaxDetectorFlow(), NBContHelper::same_connection_edge_sorter::getMinMaxRelAngles(), GUISUMOAbstractView::getObjectAtPosition(), getStringBox(), getStringBoxW(), ROLogitCalculator::getThetaForCLogit(), PositionVector::indexOfClosest(), PositionVector::insertAtClosest(), NBContHelper::maxSpeed(), NIImporter_OpenStreetMap::EdgesHandler::myStartElement(), PositionVector::nearest_offset_to_point2D(), GUIParameterTracker::onCmdSave(), pfSetSkew(), pfSetWeight(), DijkstraRouterEffortBase< E, V, PF >::EdgeInfo::reset(), DijkstraRouterTTBase< E, V, PF >::EdgeInfo::reset(), AStarRouterTTBase< E, V, PF >::EdgeInfo::reset(), MFXAddEditTypedTable::setNumberCellParams(), and GeoConvHelper::x2cartesian_const().
#define min | ( | a, | |
b | |||
) | (((a) < (b)) ? (a) : (b)) |
Definition at line 62 of file polyfonts.c.
Referenced by TplConvert::_2int(), TplConvert::_hex2int(), ROLogitCalculator::getBetaForCLogit(), NBContHelper::same_connection_edge_sorter::getMinMaxRelAngles(), getStringBox(), getStringBoxW(), ROLogitCalculator::getThetaForCLogit(), MSLCM_DK2004::patchSpeed(), pfSetSkew(), pfSetWeight(), and MFXAddEditTypedTable::setNumberCellParams().
#define numWeights (sizeof(weightOffset) / sizeof(vertex)) |
Definition at line 125 of file polyfonts.c.
Referenced by pfSetWeight().
#define PI (3.1415926535897932384626433) |
Definition at line 57 of file polyfonts.c.
Referenced by NBHelpers::angle(), GeomHelper::Angle2D(), PositionVector::around(), Line::atan2DegreeAngle(), Line::atan2DegreeSlope(), Line::atan2PositiveAngle(), NBEdge::buildInnerEdges(), NIImporter_OpenDrive::calculateCurveCenter(), NBNodeShapeComputer::computeContinuationNodeShape(), NBNode::computeInternalLaneShape(), NBNodeShapeComputer::computeNodeShapeByCrosses(), computeSameEnd(), NGRandomNetBuilder::createNewNode(), NGNet::createSpiderWeb(), GUIVehicle::drawAction_drawRailCarriages(), GUILaneWrapper::drawArrows(), GLHelper::drawBoxLines(), GLHelper::drawFilledCircle(), GUILaneWrapper::drawLinkNo(), GUILaneWrapper::drawLinkRules(), GLHelper::drawOutlineCircle(), GUILaneWrapper::drawTLSLinkNo(), NGFrame::fillOptions(), MSVehicle::getAngle(), ROLogitCalculator::getThetaForCLogit(), GUIBusStop::GUIBusStop(), GUI_E2_ZS_Collector::MyWrapper::MyWrapper(), MSLane::by_connections_to_sorter::operator()(), GUIVehicle::setFunctionalColor(), and GeoConvHelper::x2cartesian_const().
#define RtoD (180.0/PI) |
Definition at line 58 of file polyfonts.c.
#define sign | ( | a | ) | (((a)<0) ? -1 : (a)>0 ? 1 : 0) |
Definition at line 64 of file polyfonts.c.
Referenced by MSCFModel_Wiedemann::following().
#define unfix | ( | value | ) | ((SUMOReal)(value)) / ((SUMOReal)pfFixScale) |
Definition at line 132 of file polyfonts.c.
Referenced by drawWideChar().
|
static |
|
static |
Definition at line 970 of file polyfonts.c.
References pfglyph::advance, pfglyph::maxx, pfglyph::maxy, pfglyph::minx, pfglyph::miny, pfglyph::numsegments, pfGetGlyph(), pfScaleX, pfScaleY, pfSkew(), pfTextCos, pfTextSin, pfTextWeight, pfTextX, pfTextY, pfglyph::segments, SUMOReal, unfix, vertex::x, and vertex::y.
Referenced by pfDrawChar(), pfDrawString(), and pfDrawStringW().
|
static |
Definition at line 851 of file polyfonts.c.
References pfglyph::advance, and pfGetGlyph().
Referenced by getStringBox(), and getStringBoxW().
|
static |
Definition at line 528 of file polyfonts.c.
References pfglyph::maxx, pfglyph::maxy, pfglyph::minx, pfglyph::miny, and pfGetGlyph().
Referenced by getStringBox(), getStringBoxW(), and pfGetCharBBox().
|
static |
Definition at line 554 of file polyfonts.c.
References getCharAdvance(), getCharBBox(), max, min, and SUMOReal.
Referenced by pfSetScaleBox().
|
static |
Definition at line 594 of file polyfonts.c.
References getCharAdvance(), getCharBBox(), max, min, and SUMOReal.
Referenced by pfSetScaleBoxW().
|
static |
Definition at line 184 of file polyfonts.c.
References glPrims.
SUMOReal pfdkGetStringWidth | ( | const char * | c | ) |
Definition at line 1109 of file polyfonts.c.
References pfGetCharAdvance(), and SUMOReal.
Referenced by GUILaneSpeedTrigger::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GLHelper::drawText(), GLHelper::drawTextBox(), GUIParameterTracker::GUIParameterTrackerPanel::drawValue(), and GUITLLogicPhasesTrackerWindow::drawValues().
int pfDrawChar | ( | wchar_t | c | ) |
Definition at line 1054 of file polyfonts.c.
References drawWideChar().
int pfDrawString | ( | const char * | c | ) |
Definition at line 1070 of file polyfonts.c.
References drawWideChar().
Referenced by GUISUMOAbstractView::displayLegend(), GUILaneSpeedTrigger::drawGL(), GUIBusStop::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GLHelper::drawText(), GLHelper::drawTextBox(), GUIParameterTracker::GUIParameterTrackerPanel::drawValue(), and GUITLLogicPhasesTrackerWindow::drawValues().
int pfDrawStringW | ( | wchar_t * | c | ) |
Definition at line 1089 of file polyfonts.c.
References drawWideChar().
wchar_t pfGetChar | ( | int | g | ) |
Definition at line 797 of file polyfonts.c.
References pfglyph::glyph, pffont::glyphs, and pffont::numglyphs.
SUMOReal pfGetCharAdvance | ( | wchar_t | c | ) |
Definition at line 865 of file polyfonts.c.
References pfglyph::advance, pfGetGlyph(), and pfScaleX.
Referenced by pfdkGetStringWidth().
SUMOReal pfGetCharAscent | ( | wchar_t | c | ) |
Definition at line 942 of file polyfonts.c.
References pfGetCharBBox(), and SUMOReal.
Definition at line 879 of file polyfonts.c.
References getCharBBox(), pfScaleX, pfScaleY, pfSkew(), and pfTextSkew.
Referenced by pfGetCharAscent(), pfGetCharDescent(), pfGetCharHeight(), and pfGetCharWidth().
SUMOReal pfGetCharDescent | ( | wchar_t | c | ) |
Definition at line 956 of file polyfonts.c.
References pfGetCharBBox(), and SUMOReal.
SUMOReal pfGetCharHeight | ( | wchar_t | c | ) |
Definition at line 914 of file polyfonts.c.
References pfGetCharBBox(), and SUMOReal.
SUMOReal pfGetCharWidth | ( | wchar_t | c | ) |
Definition at line 928 of file polyfonts.c.
References pfGetCharBBox(), and SUMOReal.
pffont* pfGetCurrentFont | ( | ) |
Definition at line 688 of file polyfonts.c.
References pfCurrentFont.
SUMOReal pfGetFontAscent | ( | ) |
Definition at line 757 of file polyfonts.c.
References pfGetFontBBox(), and SUMOReal.
Definition at line 695 of file polyfonts.c.
References pffont::maxx, pffont::maxy, pffont::minx, pffont::miny, pfScaleX, pfScaleY, pfSkew(), and pfTextSkew.
Referenced by pfGetFontAscent(), pfGetFontDescent(), pfGetFontHeight(), and pfGetFontWidth().
SUMOReal pfGetFontDescent | ( | ) |
Definition at line 771 of file polyfonts.c.
References pfGetFontBBox(), and SUMOReal.
SUMOReal pfGetFontHeight | ( | ) |
Definition at line 729 of file polyfonts.c.
References pfGetFontBBox(), and SUMOReal.
char* pfGetFontName | ( | ) |
Definition at line 674 of file polyfonts.c.
References pffont::name.
int pfGetFontNumGlyphs | ( | ) |
Definition at line 785 of file polyfonts.c.
References pffont::numglyphs.
SUMOReal pfGetFontWidth | ( | ) |
Definition at line 743 of file polyfonts.c.
References pfGetFontBBox(), and SUMOReal.
|
static |
Definition at line 833 of file polyfonts.c.
References pfglyph::glyph, pffont::glyphs, pffont::numglyphs, and pfFindGlyph().
Referenced by drawWideChar(), getCharAdvance(), getCharBBox(), and pfGetCharAdvance().
Definition at line 484 of file polyfonts.c.
void pfSetAngleD | ( | SUMOReal | a | ) |
Definition at line 514 of file polyfonts.c.
References DtoR, and pfSetAngleR().
void pfSetAngleR | ( | SUMOReal | a | ) |
Definition at line 506 of file polyfonts.c.
References pfTextCos, and pfTextSin.
Referenced by pfSetAngleD().
void pfSetCenter | ( | int | onOff | ) |
Definition at line 521 of file polyfonts.c.
Definition at line 148 of file polyfonts.c.
Definition at line 476 of file polyfonts.c.
References pfTextX, and pfTextY.
Referenced by GUISUMOAbstractView::displayLegend(), GUILaneSpeedTrigger::drawGL(), GUIBusStop::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GLHelper::drawText(), GLHelper::drawTextBox(), GUIParameterTracker::GUIParameterTrackerPanel::drawValue(), and GUITLLogicPhasesTrackerWindow::drawValues().
void pfSetScale | ( | SUMOReal | s | ) |
Definition at line 461 of file polyfonts.c.
References pfScaleX, and pfScaleY.
Referenced by GUILaneSpeedTrigger::drawGL(), GUIBusStop::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GLHelper::drawText(), GLHelper::drawTextBox(), and GUIParameterTracker::GUIParameterTrackerPanel::drawValues().
Definition at line 634 of file polyfonts.c.
References getStringBox(), pfSetScaleXY(), and SUMOReal.
Definition at line 654 of file polyfonts.c.
References getStringBoxW(), pfSetScaleXY(), and SUMOReal.
Definition at line 468 of file polyfonts.c.
References pfScaleX, and pfScaleY.
Referenced by GUISUMOAbstractView::displayLegend(), GUIParameterTracker::GUIParameterTrackerPanel::drawValues(), GUITLLogicPhasesTrackerWindow::drawValues(), pfSetScaleBox(), and pfSetScaleBoxW().
void pfSetSkew | ( | SUMOReal | s | ) |
Definition at line 492 of file polyfonts.c.
References max, min, and pfTextSkew.
void pfSetWeight | ( | int | w | ) |
Definition at line 499 of file polyfonts.c.
References max, min, and numWeights.
Definition at line 141 of file polyfonts.c.
References pfTextSkew.
Referenced by drawWideChar(), pfGetCharBBox(), and pfGetFontBBox().
void pfUnloadFont | ( | pffont * | font | ) |
Definition at line 252 of file polyfonts.c.
References pffont::glyphs, pffont::loaded, pffont::name, and pffont::numglyphs.
|
static |
Definition at line 201 of file polyfonts.c.
References pffont::glyphs, pffont::maxx, pffont::maxy, pffont::minx, pffont::miny, pffont::name, and pffont::numglyphs.
|
static |
Definition at line 168 of file polyfonts.c.
Referenced by lookupGlOp().
|
static |
Definition at line 130 of file polyfonts.c.
|
static |
Definition at line 79 of file polyfonts.c.
Referenced by pfGetCurrentFont().
|
static |
Definition at line 80 of file polyfonts.c.
|
static |
Definition at line 98 of file polyfonts.c.
Referenced by drawWideChar(), pfGetCharAdvance(), pfGetCharBBox(), pfGetFontBBox(), pfSetScale(), and pfSetScaleXY().
|
static |
Definition at line 99 of file polyfonts.c.
Referenced by drawWideChar(), pfGetCharBBox(), pfGetFontBBox(), pfSetScale(), and pfSetScaleXY().
|
static |
Definition at line 128 of file polyfonts.c.
Referenced by drawWideChar(), and pfSetAngleR().
|
static |
Definition at line 127 of file polyfonts.c.
Referenced by drawWideChar(), and pfSetAngleR().
|
static |
Definition at line 104 of file polyfonts.c.
Referenced by pfGetCharBBox(), pfGetFontBBox(), pfSetSkew(), and pfSkew().
|
static |
Definition at line 105 of file polyfonts.c.
Referenced by drawWideChar().
|
static |
Definition at line 101 of file polyfonts.c.
Referenced by drawWideChar(), pfGetPosition(), and pfSetPosition().
|
static |
Definition at line 102 of file polyfonts.c.
Referenced by drawWideChar(), pfGetPosition(), and pfSetPosition().
vertex weightOffset[] |
Definition at line 112 of file polyfonts.c.