Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

graphics.h File Reference

Declaration of basic types for graphics. More...

#include <ogdf/basic/Logger.h>
#include <ogdf/basic/basic.h>
#include <map>
#include <typeinfo>

Go to the source code of this file.

Classes

class  ogdf::Color
 Colors represented as RGBA values. More...
 
struct  ogdf::Fill
 Properties of fills. More...
 
struct  ogdf::Stroke
 Properties of strokes. More...
 

Namespaces

 ogdf
 The namespace for all OGDF objects.
 
 ogdf::graphics
 

Enumerations

enum  ogdf::EdgeArrow { ogdf::EdgeArrow::None, ogdf::EdgeArrow::Last, ogdf::EdgeArrow::First, ogdf::EdgeArrow::Both, ogdf::EdgeArrow::Undefined }
 Types for edge arrows. More...
 
enum  ogdf::FillPattern {
  ogdf::FillPattern::None, ogdf::FillPattern::Solid, ogdf::FillPattern::Dense1, ogdf::FillPattern::Dense2, ogdf::FillPattern::Dense3, ogdf::FillPattern::Dense4, ogdf::FillPattern::Dense5, ogdf::FillPattern::Dense6, ogdf::FillPattern::Dense7, ogdf::FillPattern::Horizontal, ogdf::FillPattern::Vertical, ogdf::FillPattern::Cross, ogdf::FillPattern::BackwardDiagonal, ogdf::FillPattern::ForwardDiagonal,
  ogdf::FillPattern::DiagonalCross
}
 Fill patterns. More...
 
enum  ogdf::Shape { ogdf::Shape::Rect, ogdf::Shape::RoundedRect, ogdf::Shape::Ellipse, ogdf::Shape::Triangle, ogdf::Shape::Pentagon, ogdf::Shape::Hexagon, ogdf::Shape::Octagon, ogdf::Shape::Rhomb, ogdf::Shape::Trapeze, ogdf::Shape::Parallelogram, ogdf::Shape::InvTriangle, ogdf::Shape::InvTrapeze, ogdf::Shape::InvParallelogram, ogdf::Shape::Image }
 Types for node shapes. More...
 
enum  ogdf::StrokeLineCap : unsigned char { ogdf::StrokeLineCap::Butt, ogdf::StrokeLineCap::Round, ogdf::StrokeLineCap::Square }
 Line cap types of strokes. More...
 
enum  ogdf::StrokeLineJoin : unsigned char { ogdf::StrokeLineJoin::Miter, ogdf::StrokeLineJoin::Round, ogdf::StrokeLineJoin::Bevel }
 Line join types of strokes. More...
 
enum  ogdf::StrokeType : unsigned char { ogdf::StrokeType::None, ogdf::StrokeType::Solid, ogdf::StrokeType::Dash, ogdf::StrokeType::Dot, ogdf::StrokeType::Dashdot, ogdf::StrokeType::Dashdotdot }
 Line types of strokes. More...
 

Functions

template<class ToClass >
ToClass ogdf::fromString (string key)
 
template<class ToClass >
std::map< string, ToClass > * ogdf::graphics::getMapToEnum ()
 
template<>
std::map< string, FillPattern > * ogdf::graphics::getMapToEnum ()
 
template<class FromClass >
std::map< FromClass, string > * ogdf::graphics::getMapToString ()
 
template<>
std::map< FillPattern, string > * ogdf::graphics::getMapToString ()
 
template<class Enum >
void ogdf::graphics::init ()
 
template<>
void ogdf::graphics::init< FillPattern > ()
 
template<>
void ogdf::graphics::init< Shape > ()
 
template<>
void ogdf::graphics::init< StrokeType > ()
 
void ogdf::initFillPatternHashing ()
 
template<class Enum >
void ogdf::graphics::initSecondMap (std::map< Enum, string > &fromMap, std::map< string, Enum > &toMap)
 
FillPattern ogdf::intToFillPattern (int i)
 Converts integer i to fill pattern. More...
 
StrokeType ogdf::intToStrokeType (int i)
 Converts integer i to stroke type. More...
 
std::ostream & ogdf::operator<< (std::ostream &os, const EdgeArrow &ea)
 Output operator. More...
 
std::ostream & ogdf::operator<< (std::ostream &os, const FillPattern &fp)
 Output operator. More...
 
std::ostream & ogdf::operator<< (std::ostream &os, const Shape &shape)
 Output operator. More...
 
std::ostream & ogdf::operator<< (std::ostream &os, const StrokeType &st)
 Output operator. More...
 
template<class FromClass >
string ogdf::toString (FromClass key)
 

Variables

std::map< FillPattern, string > ogdf::graphics::fromFillPattern
 
std::map< Shape, string > ogdf::graphics::fromShape
 
std::map< StrokeType, string > ogdf::graphics::fromStrokeType
 
std::map< string, FillPattern > ogdf::graphics::toFillPattern
 
std::map< string, Shape > ogdf::graphics::toShape
 
std::map< string, StrokeType > ogdf::graphics::toStrokeType
 

Detailed Description

Declaration of basic types for graphics.

Author
Carsten Gutwenger
License:
This file is part of the Open Graph Drawing Framework (OGDF).
Copyright (C)
See README.md in the OGDF root directory for details.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Version 2 or 3 as published by the Free Software Foundation; see the file LICENSE.txt included in the packaging of this file for details.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, see http://www.gnu.org/copyleft/gpl.html

Definition in file graphics.h.