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  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  GPU_CACHED_MANAGER
 
class  GPU_MANAGER
 
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...
 
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
 
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::LINES, GRID_STYLE::DOTS, 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
}
 
enum  VIEW_UPDATE_FLAGS {
  NONE = 0x00, NONE, APPEARANCE = 0x01, COLOR = 0x02,
  GEOMETRY = 0x04, LAYERS = 0x08, ALL = 0xff
}
 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

const size_t VertexSize = sizeof(VERTEX)
 
const size_t VertexStride = VertexSize / sizeof(GLfloat)
 
const size_t CoordSize = sizeof(VERTEX().x) + sizeof(VERTEX().y) + sizeof(VERTEX().z)
 
const size_t CoordStride = CoordSize / sizeof(GLfloat)
 
const size_t ColorOffset = offsetof(VERTEX, r)
 
const size_t ColorSize
 
const size_t ColorStride = ColorSize / sizeof(GLubyte)
 
const size_t ShaderOffset = offsetof(VERTEX, shader)
 
const size_t ShaderSize = sizeof(VERTEX().shader)
 
const size_t ShaderStride = ShaderSize / sizeof(GLfloat)
 
const size_t IndexSize = 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 41 of file stroke_font.h.

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

Definition at line 44 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
LINES 

Use lines for the grid.

DOTS 

Use dots 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  LINES,
40  DOTS,
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
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.

ALL 

Layers have changed.

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  ALL = 0xff
60 };
No updates are required.
Definition: view_item.h:55
Visibility flag has changed.
Definition: view_item.h:56
Layers have changed.
Definition: view_item.h:59
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 66 of file view_item.h.

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

Function Documentation

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

Not equality operator, are two colors not equal.

Definition at line 254 of file color4d.cpp.

255 {
256  return !( lhs == rhs );
257 }
std::ostream & KIGFX::operator<< ( std::ostream &  aStream,
COLOR4D const &  aColor 
)

Syntactic sugar for outputting colors to strings.

Definition at line 259 of file color4d.cpp.

260 {
261  return aStream << aColor.ToWxString( wxC2S_CSS_SYNTAX );
262 }
const bool KIGFX::operator== ( const COLOR4D lhs,
const COLOR4D rhs 
)

Equality operator, are two colors equal.

Definition at line 248 of file color4d.cpp.

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

249 {
250  return lhs.a == rhs.a && lhs.r == rhs.r && lhs.g == rhs.g && lhs.b == rhs.b;
251 }
double g
Green component.
Definition: color4d.h:282
double b
Blue component.
Definition: color4d.h:283
double a
Alpha component.
Definition: color4d.h:284
double r
Red component.
Definition: color4d.h:281

Variable Documentation

const size_t KIGFX::ColorOffset = offsetof(VERTEX, r)
const size_t KIGFX::ColorSize
Initial value:
= sizeof(VERTEX().r) + sizeof(VERTEX().g) +
sizeof(VERTEX().b) + sizeof(VERTEX().a)

Definition at line 65 of file vertex_common.h.

const size_t KIGFX::ColorStride = ColorSize / sizeof(GLubyte)
const size_t KIGFX::CoordSize = sizeof(VERTEX().x) + sizeof(VERTEX().y) + sizeof(VERTEX().z)

Definition at line 60 of file vertex_common.h.

const size_t KIGFX::CoordStride = CoordSize / sizeof(GLfloat)
const size_t KIGFX::IndexSize = sizeof(GLuint)

Definition at line 74 of file vertex_common.h.

const size_t KIGFX::ShaderOffset = offsetof(VERTEX, shader)
const size_t KIGFX::ShaderSize = sizeof(VERTEX().shader)

Definition at line 71 of file vertex_common.h.

const size_t KIGFX::VertexStride = VertexSize / sizeof(GLfloat)

Definition at line 58 of file vertex_common.h.