![]() |
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 67 of file polyfonts.c.
Referenced by MSLCM_LC2013::_wantsChange(), MSLCM_SL2015::_wantsChangeSublane(), MSLCM_SL2015::checkStrategicChange(), MSLCM_DK2008::currentDistAllows(), MSLCM_SL2015::currentDistAllows(), MSLCM_LC2013::currentDistAllows(), MSLCM_DK2008::currentDistDisallows(), MSLCM_SL2015::currentDistDisallows(), MSLCM_LC2013::currentDistDisallows(), GUIVehicle::drawBestLanes(), AGCity::generatePopulation(), NBNode::getDirection(), PHEMlightdll::CEP::GetEmission(), MSVehicle::updateBestLanes(), and MSPModel_Striping::PState::walk().
#define DtoR (PI/180.0) |
Definition at line 63 of file polyfonts.c.
Referenced by pfSetAngleD().
#define max | ( | a, | |
b | |||
) | (((a) > (b)) ? (a) : (b)) |
Definition at line 65 of file polyfonts.c.
Referenced by TplConvert::_2int(), TplConvert::_hex2int(), MSLCM_SL2015::_wantsChangeSublane(), SUMOVehicleParserHelper::beginVTypeParsing(), CHRouter< E, V, PF >::buildContractionHierarchy(), MSLeaderDistanceInfo::clear(), MSCriticalFollowerDistanceInfo::clear(), TraCIServerAPI_Vehicle::commandDistanceRequest(), DijkstraRouterTT< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > >::compute(), DijkstraRouterEffort< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > >::compute(), AStarRouter< MSEdge, SUMOVehicle, prohibited_withPermissions< MSEdge, SUMOVehicle > >::compute(), CHRouter< E, V, PF >::compute(), computeRoutes(), NIImporter_OpenDrive::computeShapes(), MSLCM_SL2015::computeSublaneShift(), TraCIServerAPI_Simulation::convertCartesianToRoadMap(), MSAbstractLaneChangeModel::decideDirection(), SPTree< CHRouter::CHInfo, CHRouter::CHConnection >::dijkstraTT(), PositionVector::distance2D(), MSVehicle::executeMove(), MSLaneChanger::findCandidate(), NBEdge::firstIntersection(), MSActuatedTrafficLightLogic::gapControl(), GawronCalculator< R, E, V >::gawronF(), GawronCalculator< R, E, V >::gawronG(), LogitCalculator< R, E, V >::getBetaForCLogit(), MSLane::getCriticalLeader(), MSRoute::getDistanceBetween(), MSVehicle::getDistanceToPosition(), MSE2Collector::getEstimatedCurrentVehicleNumber(), MSE2Collector::getEstimateQueueLength(), MSLane::getFirstVehicleInformation(), MSLane::getFollowerOnConsecutive(), MSEdge::getFreeLane(), RODFDetectorFlows::getMaxDetectorFlow(), GUITexturesHelper::getMaxTextureSize(), NBContHelper::same_connection_edge_sorter::getMinMaxRelAngles(), MSLane::getMoveReminders(), GUISUMOAbstractView::getObjectAtPosition(), MSLCM_SL2015::getSlowest(), MSCFModel::getSpeedAfterMaxDecel(), getStringBox(), getStringBoxW(), LogitCalculator< R, E, V >::getThetaForCLogit(), PublicTransportEdge< E, L, N, V >::getTravelTime(), PositionVector::indexOfClosest(), MSLCM_LC2013::informLeader(), PositionVector::insertAtClosest(), MESegment::jamThresholdForSpeed(), NBNodeCont::joinJunctions(), NBContHelper::maxSpeed(), VectorHelper< T >::maxValue(), VectorHelper< T >::minValue(), NIImporter_OpenStreetMap::EdgesHandler::myStartElement(), PositionVector::nearest_offset_to_point2D(), GUIParameterTracker::onCmdSave(), SUMOVehicleParserHelper::parseFlowAttributes(), pfSetSkew(), pfSetWeight(), MSVehicle::planMoveInternal(), MSLCM_SL2015::prepareStep(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Vehicle::processSet(), SPTree< CHRouter::CHInfo, CHRouter::CHConnection >::rebuildFrom(), NIImporter_OpenStreetMap::reconstructLayerElevation(), PositionVector::removeClosest(), MSDevice_Routing::reroute(), DijkstraRouterEffort< E, V, PF >::EdgeInfo::reset(), DijkstraRouterTT< E, V, PF >::EdgeInfo::reset(), AStarRouter< E, V, PF >::EdgeInfo::reset(), CHRouter< E, V, PF >::EdgeInfo::reset(), CHRouter< E, V, PF >::CHInfo::reset(), MSFrame::setMSGlobals(), MFXAddEditTypedTable::setNumberCellParams(), CHRouter< E, V, PF >::Unidirectional::step(), PositionVector::transformToVectorCoordinates(), MSActuatedTrafficLightLogic::trySwitch(), CHRouter< E, V, PF >::tryUpdateFront(), MSSwarmTrafficLightLogic::updateSensitivities(), SUMOVTypeParameter::write(), and GeoConvHelper::x2cartesian_const().
#define min | ( | a, | |
b | |||
) | (((a) < (b)) ? (a) : (b)) |
Definition at line 66 of file polyfonts.c.
Referenced by TplConvert::_2int(), TplConvert::_hex2int(), AGTime::AGTime(), MSSwarmTrafficLightLogic::calculateEtaDiff(), MSSwarmTrafficLightLogic::calculateEtaRatio(), MSAbstractLaneChangeModel::decideDirection(), SPTree< CHRouter::CHInfo, CHRouter::CHConnection >::dijkstraTT(), LogitCalculator< R, E, V >::getBetaForCLogit(), NBContHelper::same_connection_edge_sorter::getMinMaxRelAngles(), getStringBox(), getStringBoxW(), LogitCalculator< R, E, V >::getThetaForCLogit(), GUIPropertyScheme< T >::interpolate(), MSLCM_DK2008::patchSpeed(), pfSetSkew(), pfSetWeight(), SPTree< CHRouter::CHInfo, CHRouter::CHConnection >::rebuildFrom(), MFXAddEditTypedTable::setNumberCellParams(), CHRouter< E, V, PF >::CHInfo::updateLevel(), and MSSwarmTrafficLightLogic::updateSensitivities().
#define numWeights (sizeof(weightOffset) / sizeof(vertex)) |
Definition at line 129 of file polyfonts.c.
Referenced by pfSetWeight().
#define PI (3.1415926535897932384626433) |
Definition at line 61 of file polyfonts.c.
Referenced by GUIPerson::drawAction_drawAsImage(), GUIContainer::drawAction_drawAsPoly(), GUIPerson::drawAction_drawAsTriangle(), GUIVehicle::drawAction_drawRailCarriages(), GNELane::drawArrows(), GUIBaseVehicle::drawOnPos(), GNEInternalLane::GNEInternalLane(), GUIBusStop::GUIBusStop(), GUIChargingStation::GUIChargingStation(), GUIContainerStop::GUIContainerStop(), GUI_E2_ZS_Collector::MyWrapper::MyWrapper(), GUIBaseVehicle::setFunctionalColor(), GNEConnection::updateGeometry(), GNECrossing::updateGeometry(), GNEChargingStation::updateGeometry(), GNEDetectorE2::updateGeometry(), GNEBusStop::updateGeometry(), GNEContainerStop::updateGeometry(), and GNELane::updateGeometry().
#define RtoD (180.0/PI) |
Definition at line 62 of file polyfonts.c.
#define sign | ( | a | ) | (((a)<0) ? -1 : (a)>0 ? 1 : 0) |
Definition at line 68 of file polyfonts.c.
Referenced by MSLaneChanger::computeOvertakingTime(), MSCFModel_Wiedemann::following(), EulerSpiral::get_fresnel_integral(), and PositionVector::transformToVectorCoordinates().
#define unfix | ( | value | ) | ((SUMOReal)(value)) / ((SUMOReal)pfFixScale) |
Definition at line 136 of file polyfonts.c.
Referenced by drawWideChar().
|
static |
|
static |
Definition at line 974 of file polyfonts.c.
References pfglyph::advance, pfglyph::maxx, pfglyph::maxy, pfglyph::minx, pfglyph::miny, pfglyph::numsegments, pfCenter, 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 855 of file polyfonts.c.
References pfglyph::advance, and pfGetGlyph().
Referenced by getStringBox(), and getStringBoxW().
|
static |
Definition at line 532 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 558 of file polyfonts.c.
References getCharAdvance(), getCharBBox(), max, min, and SUMOReal.
Referenced by pfSetScaleBox().
|
static |
Definition at line 598 of file polyfonts.c.
References getCharAdvance(), getCharBBox(), max, min, and SUMOReal.
Referenced by pfSetScaleBoxW().
|
static |
SUMOReal pfdkGetStringWidth | ( | const char * | c | ) |
Definition at line 1113 of file polyfonts.c.
References pfGetCharAdvance(), and SUMOReal.
Referenced by GNEVariableSpeedSignal::drawGL(), GUILaneSpeedTrigger::drawGL(), GUICalibrator::drawGL(), GNECalibrator::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GNERerouter::drawGL(), GLHelper::drawText(), GLHelper::drawTextBox(), GUIParameterTracker::GUIParameterTrackerPanel::drawValue(), and GUITLLogicPhasesTrackerWindow::drawValues().
int pfDrawChar | ( | wchar_t | c | ) |
Definition at line 1058 of file polyfonts.c.
References drawWideChar().
int pfDrawString | ( | const char * | c | ) |
Definition at line 1074 of file polyfonts.c.
References drawWideChar().
Referenced by GUISUMOAbstractView::displayLegend(), GNEBusStop::drawGL(), GNEContainerStop::drawGL(), GNEVariableSpeedSignal::drawGL(), GUILaneSpeedTrigger::drawGL(), GUICalibrator::drawGL(), GNEChargingStation::drawGL(), GUIChargingStation::drawGL(), GUIContainerStop::drawGL(), GUIBusStop::drawGL(), GNECalibrator::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GNERerouter::drawGL(), GLHelper::drawText(), GLHelper::drawTextBox(), GUIParameterTracker::GUIParameterTrackerPanel::drawValue(), and GUITLLogicPhasesTrackerWindow::drawValues().
int pfDrawStringW | ( | wchar_t * | c | ) |
Definition at line 1093 of file polyfonts.c.
References drawWideChar(), and SUMOReal.
wchar_t pfGetChar | ( | int | g | ) |
Definition at line 801 of file polyfonts.c.
References pfglyph::glyph, pffont::glyphs, and pffont::numglyphs.
SUMOReal pfGetCharAdvance | ( | wchar_t | c | ) |
Definition at line 869 of file polyfonts.c.
References pfglyph::advance, pfGetGlyph(), and pfScaleX.
Referenced by pfdkGetStringWidth().
SUMOReal pfGetCharAscent | ( | wchar_t | c | ) |
Definition at line 946 of file polyfonts.c.
References pfGetCharBBox(), and SUMOReal.
Definition at line 883 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 960 of file polyfonts.c.
References pfGetCharBBox(), and SUMOReal.
SUMOReal pfGetCharHeight | ( | wchar_t | c | ) |
Definition at line 918 of file polyfonts.c.
References pfGetCharBBox(), and SUMOReal.
SUMOReal pfGetCharWidth | ( | wchar_t | c | ) |
Definition at line 932 of file polyfonts.c.
References pfGetCharBBox(), and SUMOReal.
pffont* pfGetCurrentFont | ( | ) |
Definition at line 692 of file polyfonts.c.
References pfCurrentFont.
SUMOReal pfGetFontAscent | ( | ) |
Definition at line 761 of file polyfonts.c.
References pfGetFontBBox(), and SUMOReal.
Definition at line 699 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 775 of file polyfonts.c.
References pfGetFontBBox(), and SUMOReal.
SUMOReal pfGetFontHeight | ( | ) |
Definition at line 733 of file polyfonts.c.
References pfGetFontBBox(), and SUMOReal.
char* pfGetFontName | ( | ) |
Definition at line 678 of file polyfonts.c.
References pffont::name.
int pfGetFontNumGlyphs | ( | ) |
Definition at line 789 of file polyfonts.c.
References pffont::numglyphs.
SUMOReal pfGetFontWidth | ( | ) |
Definition at line 747 of file polyfonts.c.
References pfGetFontBBox(), and SUMOReal.
|
static |
Definition at line 837 of file polyfonts.c.
References pfglyph::glyph, pffont::glyphs, pffont::numglyphs, and pfFindGlyph().
Referenced by drawWideChar(), getCharAdvance(), getCharBBox(), and pfGetCharAdvance().
Definition at line 488 of file polyfonts.c.
void pfSetAngleD | ( | SUMOReal | a | ) |
Definition at line 518 of file polyfonts.c.
References DtoR, and pfSetAngleR().
void pfSetAngleR | ( | SUMOReal | a | ) |
Definition at line 510 of file polyfonts.c.
References pfTextCos, and pfTextSin.
Referenced by pfSetAngleD().
void pfSetCenter | ( | int | onOff | ) |
Definition at line 525 of file polyfonts.c.
References pfCenter.
int pfSetFont | ( | pffont * | f | ) |
Definition at line 152 of file polyfonts.c.
Definition at line 480 of file polyfonts.c.
References pfTextX, and pfTextY.
Referenced by GUISUMOAbstractView::displayLegend(), GNEBusStop::drawGL(), GNEContainerStop::drawGL(), GNEVariableSpeedSignal::drawGL(), GUILaneSpeedTrigger::drawGL(), GUICalibrator::drawGL(), GNEChargingStation::drawGL(), GUIChargingStation::drawGL(), GUIContainerStop::drawGL(), GUIBusStop::drawGL(), GNECalibrator::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GNERerouter::drawGL(), GLHelper::drawText(), GLHelper::drawTextBox(), GUIParameterTracker::GUIParameterTrackerPanel::drawValue(), and GUITLLogicPhasesTrackerWindow::drawValues().
void pfSetScale | ( | SUMOReal | s | ) |
Definition at line 465 of file polyfonts.c.
References pfScaleX, and pfScaleY.
Referenced by GNEBusStop::drawGL(), GNEContainerStop::drawGL(), GNEVariableSpeedSignal::drawGL(), GUILaneSpeedTrigger::drawGL(), GUICalibrator::drawGL(), GNEChargingStation::drawGL(), GUIChargingStation::drawGL(), GUIContainerStop::drawGL(), GUIBusStop::drawGL(), GNECalibrator::drawGL(), GUITriggeredRerouter::GUITriggeredRerouterEdge::drawGL(), GNERerouter::drawGL(), GLHelper::drawText(), GLHelper::drawTextBox(), and GUIParameterTracker::GUIParameterTrackerPanel::drawValues().
Definition at line 638 of file polyfonts.c.
References getStringBox(), pfSetScaleXY(), and SUMOReal.
Definition at line 658 of file polyfonts.c.
References getStringBoxW(), pfSetScaleXY(), and SUMOReal.
Definition at line 472 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 496 of file polyfonts.c.
References max, min, and pfTextSkew.
void pfSetWeight | ( | int | w | ) |
Definition at line 503 of file polyfonts.c.
References max, min, numWeights, and pfTextWeight.
Definition at line 145 of file polyfonts.c.
References pfTextSkew.
Referenced by drawWideChar(), pfGetCharBBox(), and pfGetFontBBox().
void pfUnloadFont | ( | pffont * | font | ) |
Definition at line 256 of file polyfonts.c.
References pffont::glyphs, pffont::loaded, lookupGlOp(), pffont::maxx, pffont::maxy, pffont::minx, pffont::miny, pffont::name, pffont::numglyphs, pfglyph::segments, and SUMOReal.
|
static |
Definition at line 205 of file polyfonts.c.
References pffont::glyphs, pffont::maxx, pffont::maxy, pffont::minx, pffont::miny, pffont::name, and pffont::numglyphs.
|
static |
Definition at line 172 of file polyfonts.c.
Referenced by lookupGlOp().
|
static |
Definition at line 134 of file polyfonts.c.
Referenced by drawWideChar(), and pfSetCenter().
|
static |
Definition at line 83 of file polyfonts.c.
Referenced by pfGetCurrentFont().
|
static |
Definition at line 84 of file polyfonts.c.
|
static |
Definition at line 102 of file polyfonts.c.
Referenced by drawWideChar(), pfGetCharAdvance(), pfGetCharBBox(), pfGetFontBBox(), pfSetScale(), and pfSetScaleXY().
|
static |
Definition at line 103 of file polyfonts.c.
Referenced by drawWideChar(), pfGetCharBBox(), pfGetFontBBox(), pfSetScale(), and pfSetScaleXY().
|
static |
Definition at line 132 of file polyfonts.c.
Referenced by drawWideChar(), and pfSetAngleR().
|
static |
Definition at line 131 of file polyfonts.c.
Referenced by drawWideChar(), and pfSetAngleR().
|
static |
Definition at line 108 of file polyfonts.c.
Referenced by pfGetCharBBox(), pfGetFontBBox(), pfSetSkew(), and pfSkew().
|
static |
Definition at line 109 of file polyfonts.c.
Referenced by drawWideChar(), and pfSetWeight().
|
static |
Definition at line 105 of file polyfonts.c.
Referenced by drawWideChar(), pfGetPosition(), and pfSetPosition().
|
static |
Definition at line 106 of file polyfonts.c.
Referenced by drawWideChar(), pfGetPosition(), and pfSetPosition().
vertex weightOffset[] |
Definition at line 116 of file polyfonts.c.