65        if( 
gvconfig()->m_Display.m_ForceOpacityMode )
 
 
  124        if( 
gvconfig()->m_Appearance.show_negative_objects )
 
 
  201    if( aActualThickness == 0 )
 
  204    return aActualThickness;
 
 
  214        draw( gbrItem, aLayer );
 
 
  229    bool     isFilled = 
true;
 
  246        codeText.Printf( wxT( 
"D%d" ), aItem->
m_DCode );
 
  248        m_gal->SetIsStroke( 
true );
 
  249        m_gal->SetIsFill( 
false );
 
  252        m_gal->SetLineWidth( textSize/10 );
 
  253        m_gal->SetFontBold( 
false );
 
  254        m_gal->SetFontItalic( 
false );
 
  255        m_gal->SetFontUnderlined( 
false );
 
  256        m_gal->SetTextMirrored( 
false );
 
  260        m_gal->BitmapText( codeText, textPosition, orient );
 
  271    m_gal->SetNegativeDrawMode( isNegative && !
gvconfig()->m_Appearance.show_negative_objects );
 
  274    m_gal->SetIsFill( isFilled );
 
  275    m_gal->SetIsStroke( !isFilled );
 
  282        m_gal->SetIsFill( isFilled );
 
  283        m_gal->SetIsStroke( !isFilled );
 
  285        if( isNegative && !isFilled )
 
  287            m_gal->SetNegativeDrawMode( 
false );
 
  298            for( 
auto& pt : pts )
 
  302            chain.SetClosed( 
true );
 
  351        m_gal->SetIsFill( isFilled );
 
  352        m_gal->SetIsStroke( !isFilled );
 
  361        if( startAngle > endAngle )
 
  365        if( arcStart == arcEnd )
 
  369        int arc_to_seg_error = 
gerbIUScale.mmToIU( 0.005 );    
 
  374        m_gal->SetIsFill( 
false );
 
  375        m_gal->SetIsStroke( 
true );
 
  376        m_gal->SetLineWidth( 5 );
 
  384        m_gal->SetIsFill( 
false );
 
  385        m_gal->SetIsStroke( 
true );
 
  387        m_gal->SetLineWidth( 5 );
 
  412        m_gal->SetIsFill( isFilled );
 
  413        m_gal->SetIsStroke( !isFilled );
 
  415        if( isNegative && !isFilled )
 
  432            m_gal->DrawSegment( start, 
end, width );
 
  438        wxASSERT_MSG( 
false, wxT( 
"GERBER_DRAW_ITEM shape is unknown!" ) );
 
  441    m_gal->SetNegativeDrawMode( 
false );
 
  446    m_gal->SetIsStroke( 
true );
 
  447    m_gal->SetIsFill( 
true );
 
  448    m_gal->SetLineWidth( 3 );
 
 
  457                                    bool aFilled, 
bool aShift )
 
  472    if( !
gvconfig()->m_Display.m_DisplayPolygonsFill )
 
  478        m_gal->DrawPolygon( poly );
 
 
  486    wxASSERT_MSG( code, wxT( 
"drawFlashedShape: Item has no D_CODE!" ) );
 
  491    m_gal->SetIsFill( aFilled );
 
  492    m_gal->SetIsStroke( !aFilled );
 
  521        codeStart.
x = aShapePos.
x - code->
m_Size.
x / 2;
 
  522        codeStart.
y = aShapePos.
y - code->
m_Size.
y / 2;
 
  592        wxASSERT_MSG( 
false, wxT( 
"Unknown Gerber flashed shape!" ) );
 
 
  609    if( !
gvconfig()->m_Display.m_DisplayPolygonsFill )
 
  619        m_gal->DrawPolygon( polyset );
 
 
constexpr EDA_IU_SCALE gerbIUScale
 
Support the "aperture macro" defined within standard RS274X.
 
SHAPE_POLY_SET * GetApertureMacroShape(const GERBER_DRAW_ITEM *aParent, const VECTOR2I &aShapePos)
Calculate the primitive shape for flashed items.
 
constexpr const Vec GetEnd() const
 
constexpr const Vec & GetOrigin() const
 
Color settings are a bit different than most of the settings objects in that there can be more than o...
 
COLOR4D GetColor(int aLayer) const
 
A gerber DCODE (also called Aperture) definition.
 
APERTURE_MACRO * GetMacro() const
 
wxString m_AperFunction
the aperture attribute (created by a TA.AperFunction command).
 
int m_Num_Dcode
D code value ( >= 10 )
 
VECTOR2I m_Size
Horizontal and vertical dimensions.
 
APERTURE_T m_ApertType
Aperture type ( Line, rectangle, circle, oval poly, macro )
 
APERTURE_DEF_HOLETYPE m_DrillShape
shape of the hole (0 = no hole, round = 1, rect = 2).
 
void ConvertShapeToPolygon(const GERBER_DRAW_ITEM *aParent)
Convert a shape to an equivalent polygon.
 
A base class for most all the KiCad significant classes used in schematics and boards.
 
KICAD_T Type() const
Returns the type of object.
 
bool IsBrightened() const
 
bool m_DisplayFlashedItemsFill
Option to draw flashed items (filled/sketch)
 
double m_OpacityModeAlphaValue
the alpha channel (opacity) value in opacity forced mode
 
bool m_DisplayPolygonsFill
Option to draw polygons (filled/sketch)
 
bool m_DisplayLinesFill
Option to draw line items (filled/sketch)
 
bool GetTextD_CodePrms(int &aSize, VECTOR2I &aPos, EDA_ANGLE &aOrientation)
Return the best size and orientation to display the D_Code on screen.
 
D_CODE * GetDcodeDescr() const
Return the GetDcodeDescr of this object, or NULL.
 
VECTOR2I GetABPosition(const VECTOR2I &aXYPosition) const
Return the image position of aPosition for this object.
 
SHAPE_POLY_SET m_ShapeAsPolygon
 
bool GetLayerPolarity() const
 
void ConvertSegmentToPolygon()
Convert a line to an equivalent polygon.
 
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
 
GBR_BASIC_SHAPE_TYPE m_ShapeType
 
GERBER_FILE_IMAGE * m_GerberImageFile
 
SHAPE_POLY_SET m_AbsolutePolygon
 
virtual const BOX2I ViewBBox() const override
 
const GBR_NETLIST_METADATA & GetNetAttributes() const
 
bool m_ImageNegative
true = Negative image
 
GBR_DISPLAY_OPTIONS m_Display
 
A color representation with 4 components: red, green, blue, alpha.
 
COLOR4D Darkened(double aFactor) const
Return a color that is darker by a given factor, without modifying object.
 
static const COLOR4D WHITE
 
COLOR4D Brightened(double aFactor) const
Return a color that is brighter by a given factor, without modifying object.
 
static const COLOR4D BLACK
 
Abstract interface for drawing on a 2D-surface.
 
virtual bool Draw(const VIEW_ITEM *aItem, int aLayer) override
Takes an instance of VIEW_ITEM and passes it to a function that knows how to draw the item.
 
GERBVIEW_PAINTER(GAL *aGal)
 
void drawPolygon(GERBER_DRAW_ITEM *aParent, const SHAPE_POLY_SET &aPolygon, bool aFilled, bool aShift=false)
Helper routine to draw a polygon.
 
virtual GERBVIEW_RENDER_SETTINGS * GetSettings() override
Return a pointer to current settings that are going to be used when drawing items.
 
int getLineThickness(int aActualThickness) const
Get the thickness to draw for a line (e.g.
 
void draw(GERBER_DRAW_ITEM *aVia, int aLayer)
 
void drawApertureMacro(GERBER_DRAW_ITEM *aParent, bool aFilled)
Helper to draw an aperture macro shape.
 
GERBVIEW_RENDER_SETTINGS m_gerbviewSettings
 
void drawFlashedShape(GERBER_DRAW_ITEM *aItem, bool aFilled)
Helper to draw a flashed shape (aka spot)
 
wxString m_attributeHighlightString
If set to anything but an empty string, will highlight items with matching attribute.
 
void LoadColors(const COLOR_SETTINGS *aSettings) override
 
wxString m_componentHighlightString
If set to anything but an empty string, will highlight items with matching component.
 
void ClearHighlightSelections()
Clear all highlight selections (dcode, net, component, attribute selection)
 
int m_dcodeHighlightValue
If set to anything but >0 (in fact 10 the min dcode value), will highlight items with matching dcode.
 
static const double MAX_FONT_SIZE
Maximum font size for D-Codes and other strings.
 
GERBVIEW_RENDER_SETTINGS()
 
wxString m_netHighlightString
If set to anything but an empty string, will highlight items with matching net.
 
virtual COLOR4D GetColor(const VIEW_ITEM *aItem, int aLayer) const override
Returns the color that should be used to draw the specific VIEW_ITEM on the specific layer using curr...
 
bool GetShowPageLimits() const override
 
GAL * m_gal
Instance of graphic abstraction layer that gives an interface to call commands used to draw (eg.
 
PAINTER(GAL *aGal)
Initialize this object for painting on any of the polymorphic GRAPHICS_ABSTRACTION_LAYER* derivatives...
 
COLOR4D m_backgroundColor
 
std::map< int, COLOR4D > m_layerColorsHi
 
virtual void update()
Precalculates extra colors for layers (e.g.
 
std::map< int, COLOR4D > m_hiContrastColor
 
std::map< int, COLOR4D > m_layerColorsDark
 
std::map< int, COLOR4D > m_layerColorsSel
 
std::set< int > m_highContrastLayers
 
std::map< int, COLOR4D > m_layerColors
 
bool m_hiContrastEnabled
Parameters for display modes.
 
An abstract base class for deriving all objects that can be added to a VIEW.
 
virtual SETTINGS_MANAGER & GetSettingsManager() const
 
T * GetAppSettings(const char *aFilename)
Return a handle to the a given settings by type.
 
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
 
int PointCount() const
Return the number of points (vertices) in this line chain.
 
const std::vector< VECTOR2I > & CPoints() const
 
Represent a set of closed polygons.
 
bool IsTriangulationUpToDate() const
 
int AddOutline(const SHAPE_LINE_CHAIN &aOutline)
Adds a new outline to the set and returns its index.
 
virtual void CacheTriangulation(bool aPartition=true, bool aSimplify=false)
Build a polygon triangulation, needed to draw a polygon on OpenGL and in some other calculations.
 
int Append(int x, int y, int aOutline=-1, int aHole=-1, bool aAllowDuplication=false)
Appends a vertex at the end of the given outline/hole (default: the last outline)
 
int NewOutline()
Creates a new empty polygon in the set and returns its index.
 
int OutlineCount() const
Return the number of outlines in the set.
 
const SHAPE_LINE_CHAIN & COutline(int aIndex) const
 
double Distance(const VECTOR2< extended_type > &aVector) const
Compute the distance between two vectors.
 
static constexpr EDA_ANGLE ANGLE_360
 
GERBVIEW_SETTINGS * gvconfig()
 
@ LAYER_GERBVIEW_DRAWINGSHEET
 
@ GERBVIEW_LAYER_ID_START
 
bool IsDCodeLayer(int aLayer)
 
@ LAYER_DRAWINGSHEET
Sheet frame and title block.
 
#define GERBER_DRAWLAYERS_COUNT
Number of draw layers in Gerbview.
 
The Cairo implementation of the graphics abstraction layer.
 
PGM_BASE & Pgm()
The global program "get" accessor.
 
const SHAPE_LINE_CHAIN chain
 
VECTOR2< int32_t > VECTOR2I
 
VECTOR2< double > VECTOR2D