KiCad PCB EDA Suite
KIGFX Namespace Reference

Class CAIRO_GAL is the cairo implementation of the graphics abstraction layer. More...

Namespaces

 BUILTIN_FONT
 
 BUILTIN_SHADERS
 
 DETAIL
 
 PREVIEW
 

Classes

class  ANTIALIASING_NONE
 
class  ANTIALIASING_SMAA
 
class  ANTIALIASING_SUPERSAMPLING
 
class  CACHED_CONTAINER
 Class to store VERTEX instances with caching. More...
 
class  CACHED_CONTAINER_GPU
 Specialization of CACHED_CONTAINER that stores data in video memory via memory mapping. More...
 
class  CACHED_CONTAINER_RAM
 Specialization of CACHED_CONTAINER that stores data in RAM. More...
 
class  CAIRO_COMPOSITOR
 
class  CAIRO_GAL
 
class  COLOR4D
 Class COLOR4D is the color representation with 4 components: red, green, blue, alpha. More...
 
class  COMPOSITOR
 
class  GAL
 Class GAL is the abstract interface for drawing on a 2D-surface. More...
 
class  GAL_DISPLAY_OPTIONS
 
class  GAL_DISPLAY_OPTIONS_OBSERVER
 
class  GERBVIEW_PAINTER
 Class GERBVIEW_PAINTER Contains methods for drawing GerbView-specific items. More...
 
class  GERBVIEW_RENDER_SETTINGS
 Class GERBVIEW_RENDER_SETTINGS Stores GerbView specific render settings. More...
 
class  GPU_CACHED_MANAGER
 
class  GPU_MANAGER
 Class to handle uploading vertices and indices to GPU in drawing purposes. More...
 
class  GPU_NONCACHED_MANAGER
 
class  NONCACHED_CONTAINER
 
class  OPENGL_COMPOSITOR
 
class  OPENGL_GAL
 Class OpenGL_GAL is the OpenGL implementation of the Graphics Abstraction Layer. More...
 
class  OPENGL_PRESENTOR
 
class  ORIGIN_VIEWITEM
 
class  PAINTER
 Class PAINTER contains all the knowledge about how to draw graphical object onto any particular output device. More...
 
class  PCB_PAINTER
 Class PCB_PAINTER Contains methods for drawing PCB-specific items. More...
 
class  PCB_RENDER_SETTINGS
 Class PCB_RENDER_SETTINGS Stores PCB specific render settings. More...
 
class  PCB_VIEW
 
struct  queryVisitor
 
class  RATSNEST_VIEWITEM
 
class  RENDER_SETTINGS
 Class RENDER_SETTINGS Contains all the knowledge about how graphical objects are drawn on any output surface/device. More...
 
class  SHADER
 Class SHADER provides the access to the OpenGL shaders. More...
 
class  STROKE_FONT
 Class STROKE_FONT implements stroke font drawing. More...
 
struct  VC_SETTINGS
 

Structure to keep VIEW_CONTROLS settings for easy store/restore operations

More...
 
struct  VERTEX
 

Data structure for vertices {X,Y,Z,R,G,B,A,shader&param}

More...
 
class  VERTEX_CONTAINER
 
class  VERTEX_ITEM
 
class  VERTEX_MANAGER
 
class  VIEW
 Class VIEW. More...
 
class  VIEW_CONTROLS
 Class VIEW_CONTROLS is an interface for classes handling user events controlling the view behaviour (such as zooming, panning, mouse grab, etc.) More...
 
class  VIEW_GROUP
 
class  VIEW_ITEM
 Class VIEW_ITEM - is an abstract base class for deriving all objects that can be added to a VIEW. More...
 
class  VIEW_ITEM_DATA
 
class  VIEW_RTREE
 Class VIEW_RTREE - Implements an R-tree for fast spatial indexing of VIEW items. More...
 
class  WORKSHEET_VIEWITEM
 
class  WX_VIEW_CONTROLS
 Class WX_VIEW_CONTROLS is a specific implementation of class VIEW_CONTROLS for wxWidgets library. More...
 

Typedefs

typedef std::deque< std::deque< VECTOR2D > > GLYPH
 
typedef std::vector< GLYPHGLYPH_LIST
 
typedef RTree< VIEW_ITEM *, int, 2, float > VIEW_RTREE_BASE
 

Enumerations

enum  SUPERSAMPLING_MODE { SUPERSAMPLING_MODE::X2, SUPERSAMPLING_MODE::X4 }
 
enum  SMAA_QUALITY { SMAA_QUALITY::HIGH, SMAA_QUALITY::ULTRA }
 
enum  RENDER_TARGET { TARGET_CACHED = 0, TARGET_NONCACHED, TARGET_OVERLAY, TARGETS_NUMBER }
 RENDER_TARGET: Possible rendering targets. More...
 
enum  GRID_STYLE { GRID_STYLE::DOTS, GRID_STYLE::LINES, GRID_STYLE::SMALL_CROSS }
 GRID_STYLE: Type definition of the grid style. More...
 
enum  OPENGL_ANTIALIASING_MODE {
  NONE, OPENGL_ANTIALIASING_MODE::SUBSAMPLE_HIGH, OPENGL_ANTIALIASING_MODE::SUBSAMPLE_ULTRA, OPENGL_ANTIALIASING_MODE::SUPERSAMPLING_X2,
  OPENGL_ANTIALIASING_MODE::SUPERSAMPLING_X4
}
 
enum  SHADER_TYPE { SHADER_TYPE_VERTEX = GL_VERTEX_SHADER, SHADER_TYPE_FRAGMENT = GL_FRAGMENT_SHADER, SHADER_TYPE_GEOMETRY = GL_GEOMETRY_SHADER }
 Type definition for the shader. More...
 
enum  SHADER_MODE {
  SHADER_NONE = 0, SHADER_LINE, SHADER_FILLED_CIRCLE, SHADER_STROKED_CIRCLE,
  SHADER_FONT
}
 

Possible types of shaders

More...
 
enum  VIEW_UPDATE_FLAGS {
  NONE = 0x00, NONE, APPEARANCE = 0x01, COLOR = 0x02,
  GEOMETRY = 0x04, LAYERS = 0x08, INITIAL_ADD = 0x10, ALL = 0xef
}
 Enum VIEW_UPDATE_FLAGS. More...
 
enum  VIEW_VISIBILITY_FLAGS { VISIBLE = 0x01, HIDDEN = 0x02 }
 Enum VIEW_VISIBILITY_FLAGS. More...
 

Functions

const bool operator== (const COLOR4D &lhs, const COLOR4D &rhs)
 Equality operator, are two colors equal. More...
 
const bool operator!= (const COLOR4D &lhs, const COLOR4D &rhs)
 Not equality operator, are two colors not equal. More...
 
std::ostream & operator<< (std::ostream &aStream, COLOR4D const &aColor)
 Syntactic sugar for outputting colors to strings. More...
 

Variables

static constexpr size_t VERTEX_SIZE = sizeof(VERTEX)
 
static constexpr size_t VERTEX_STRIDE = VERTEX_SIZE / sizeof(GLfloat)
 
static constexpr size_t COORD_OFFSET = offsetof(VERTEX, x)
 
static constexpr size_t COORD_SIZE = sizeof(VERTEX::x) + sizeof(VERTEX::y) + sizeof(VERTEX::z)
 
static constexpr size_t COORD_STRIDE = COORD_SIZE / sizeof(GLfloat)
 
static constexpr size_t COLOR_OFFSET = offsetof(VERTEX, r)
 
static constexpr size_t COLOR_SIZE = sizeof(VERTEX::r) + sizeof(VERTEX::g) + sizeof(VERTEX::b) + sizeof(VERTEX::a)
 
static constexpr size_t COLOR_STRIDE = COLOR_SIZE / sizeof(GLubyte)
 
static constexpr size_t SHADER_OFFSET = offsetof(VERTEX, shader)
 
static constexpr size_t SHADER_SIZE = sizeof(VERTEX::shader)
 
static constexpr size_t SHADER_STRIDE = SHADER_SIZE / sizeof(GLfloat)
 
static constexpr size_t INDEX_SIZE = sizeof(GLuint)
 

Detailed Description

Class CAIRO_GAL is the cairo implementation of the graphics abstraction layer.

Class ORIGIN_VIEWITEM.

Quote from Wikipedia: " Cairo is a software library used to provide a vector graphics-based, device-independent API for software developers. It is designed to provide primitives for 2-dimensional drawing across a number of different backends. "
Cairo offers also backends for Postscript and PDF surfaces. So it can be used for printing of KiCad graphics surfaces as well.

View item to draw an origin marker.

Typedef Documentation

typedef std::deque< std::deque<VECTOR2D> > KIGFX::GLYPH

Definition at line 43 of file stroke_font.h.

typedef std::vector<GLYPH> KIGFX::GLYPH_LIST

Definition at line 46 of file stroke_font.h.

typedef RTree<VIEW_ITEM*, int, 2, float> KIGFX::VIEW_RTREE_BASE

Definition at line 34 of file view_rtree.h.

Enumeration Type Documentation

enum KIGFX::GRID_STYLE
strong

GRID_STYLE: Type definition of the grid style.

Enumerator
DOTS 

Use dots for the grid.

LINES 

Use lines for the grid.

SMALL_CROSS 

Use small cross instead of dots for the grid.

Definition at line 37 of file gal_display_options.h.

38  {
39  DOTS,
40  LINES,
42  };
Use lines for the grid.
Use dots for the grid.
Use small cross instead of dots for the grid.

RENDER_TARGET: Possible rendering targets.

Enumerator
TARGET_CACHED 

Main rendering target (cached)

TARGET_NONCACHED 

Auxiliary rendering target (noncached)

TARGET_OVERLAY 

Items that may change while the view stays the same (noncached)

TARGETS_NUMBER 

Number of available rendering targets.

Definition at line 39 of file definitions.h.

40 {
41  TARGET_CACHED = 0,
45 };
Number of available rendering targets.
Definition: definitions.h:44
Auxiliary rendering target (noncached)
Definition: definitions.h:42
Items that may change while the view stays the same (noncached)
Definition: definitions.h:43
Main rendering target (cached)
Definition: definitions.h:41

Possible types of shaders

Enumerator
SHADER_NONE 
SHADER_LINE 
SHADER_FILLED_CIRCLE 
SHADER_STROKED_CIRCLE 
SHADER_FONT 

Definition at line 40 of file vertex_common.h.

Type definition for the shader.

Enumerator
SHADER_TYPE_VERTEX 

Vertex shader.

SHADER_TYPE_FRAGMENT 

Fragment shader.

SHADER_TYPE_GEOMETRY 

Geometry shader.

Definition at line 42 of file shader.h.

43 {
44  SHADER_TYPE_VERTEX = GL_VERTEX_SHADER,
45  SHADER_TYPE_FRAGMENT = GL_FRAGMENT_SHADER,
46  SHADER_TYPE_GEOMETRY = GL_GEOMETRY_SHADER
47 };
Fragment shader.
Definition: shader.h:45
Vertex shader.
Definition: shader.h:44
Geometry shader.
Definition: shader.h:46
enum KIGFX::SMAA_QUALITY
strong
Enumerator
HIGH 
ULTRA 

Definition at line 105 of file antialiasing.h.

Enumerator
X2 
X4 

Definition at line 73 of file antialiasing.h.

Enum VIEW_UPDATE_FLAGS.

Defines the how severely the shape/appearance of the item has been changed:

  • NONE: TODO
  • APPEARANCE: shape or layer set of the item have not been affected, only colors or visibility.
  • COLOR:
  • GEOMETRY: shape or layer set of the item have changed, VIEW may need to reindex it.
  • LAYERS: TODO
  • ALL: all the flags above
Enumerator
NONE 
NONE 
APPEARANCE 

No updates are required.

COLOR 

Visibility flag has changed.

GEOMETRY 

Color has changed.

LAYERS 

Position or shape has changed.

INITIAL_ADD 

Layers have changed.

ALL 

Item is being added to the view.

Definition at line 53 of file view_item.h.

53  {
54  NONE = 0x00,
55  APPEARANCE = 0x01,
56  COLOR = 0x02,
57  GEOMETRY = 0x04,
58  LAYERS = 0x08,
59  INITIAL_ADD = 0x10,
60  ALL = 0xef
61 };
Layers have changed.
Definition: view_item.h:59
No updates are required.
Definition: view_item.h:55
Visibility flag has changed.
Definition: view_item.h:56
Definition: hash_eda.h:46
Position or shape has changed.
Definition: view_item.h:58
Color has changed.
Definition: view_item.h:57

Enum VIEW_VISIBILITY_FLAGS.

Defines the visibility of the item (temporarily hidden, invisible, etc).

Enumerator
VISIBLE 
HIDDEN 

Item is visible (in general)

Definition at line 67 of file view_item.h.

67  {
68  VISIBLE = 0x01,
69  HIDDEN = 0x02
70 };
Item is visible (in general)
Definition: view_item.h:69

Function Documentation

const bool KIGFX::operator!= ( const COLOR4D lhs,
const COLOR4D rhs 
)

Not equality operator, are two colors not equal.

Definition at line 260 of file color4d.cpp.

261 {
262  return !( lhs == rhs );
263 }
std::ostream & KIGFX::operator<< ( std::ostream &  aStream,
COLOR4D const &  aColor 
)

Syntactic sugar for outputting colors to strings.

Definition at line 265 of file color4d.cpp.

266 {
267  return aStream << aColor.ToWxString( wxC2S_CSS_SYNTAX );
268 }
const bool KIGFX::operator== ( const COLOR4D lhs,
const COLOR4D rhs 
)

Equality operator, are two colors equal.

Definition at line 254 of file color4d.cpp.

References KIGFX::COLOR4D::a, KIGFX::COLOR4D::b, KIGFX::COLOR4D::g, and KIGFX::COLOR4D::r.

255 {
256  return lhs.a == rhs.a && lhs.r == rhs.r && lhs.g == rhs.g && lhs.b == rhs.b;
257 }
double g
Green component.
Definition: color4d.h:287
double b
Blue component.
Definition: color4d.h:288
double a
Alpha component.
Definition: color4d.h:289
double r
Red component.
Definition: color4d.h:286

Variable Documentation

constexpr size_t KIGFX::COLOR_OFFSET = offsetof(VERTEX, r)
static
constexpr size_t KIGFX::COLOR_SIZE = sizeof(VERTEX::r) + sizeof(VERTEX::g) + sizeof(VERTEX::b) + sizeof(VERTEX::a)
static

Definition at line 65 of file vertex_common.h.

constexpr size_t KIGFX::COLOR_STRIDE = COLOR_SIZE / sizeof(GLubyte)
static
constexpr size_t KIGFX::COORD_OFFSET = offsetof(VERTEX, x)
static

Definition at line 60 of file vertex_common.h.

Referenced by KIGFX::GPU_CACHED_MANAGER::EndDrawing().

constexpr size_t KIGFX::COORD_SIZE = sizeof(VERTEX::x) + sizeof(VERTEX::y) + sizeof(VERTEX::z)
static

Definition at line 61 of file vertex_common.h.

constexpr size_t KIGFX::COORD_STRIDE = COORD_SIZE / sizeof(GLfloat)
static
constexpr size_t KIGFX::INDEX_SIZE = sizeof(GLuint)
static

Definition at line 73 of file vertex_common.h.

constexpr size_t KIGFX::SHADER_OFFSET = offsetof(VERTEX, shader)
static
constexpr size_t KIGFX::SHADER_SIZE = sizeof(VERTEX::shader)
static

Definition at line 70 of file vertex_common.h.

constexpr size_t KIGFX::SHADER_STRIDE = SHADER_SIZE / sizeof(GLfloat)
static
constexpr size_t KIGFX::VERTEX_STRIDE = VERTEX_SIZE / sizeof(GLfloat)
static

Definition at line 58 of file vertex_common.h.