pcb 4.1.1
An interactive printed circuit board layout editor.

draw.h File Reference

Prototypes for drawing routines. More...

#include "global.h"
Include dependency graph for draw.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void Draw (void)
 Initiate the actual redrawing of the updated area.
void Redraw (void)
 Redraws all the data by the event handlers.
void DrawVia (PinType *)
 Draw a via object.
void DrawRat (RatType *)
 Draws a ratline.
void DrawViaName (PinType *)
 Draws the name of a via.
void DrawPin (PinType *)
 Draw a pin object.
void DrawPinName (PinType *)
 Draws the name of a pin.
void DrawPad (PadType *)
 Draw a pad object.
void DrawPadName (PadType *)
 Draws the name of a pad.
void DrawLine (LayerType *, LineType *)
 Draws a line on a layer.
void DrawArc (LayerType *, ArcType *)
 Draws an arc on a layer.
void DrawText (LayerType *, TextType *)
 Draws a text on a layer.
void DrawPolygon (LayerType *, PolygonType *)
 Draws a polygon on a layer.
void DrawElement (ElementType *)
 Draws an element.
void DrawElementName (ElementType *)
 Draws the name of an element.
void DrawElementPackage (ElementType *)
 Draws the package of an element.
void DrawElementPinsAndPads (ElementType *)
 Draw pins of an element.
void DrawObject (int, void *, void *)
void DrawLayer (LayerType *, const BoxType *)
void EraseVia (PinType *)
 Erase a via.
void EraseRat (RatType *)
 Erase a ratline.
void EraseViaName (PinType *)
 Erase a via name.
void ErasePad (PadType *)
 Erase a pad object.
void ErasePadName (PadType *)
 Erase a pad name.
void ErasePin (PinType *)
 Erase a pin object.
void ErasePinName (PinType *)
 Erase a pin name.
void EraseLine (LineType *)
 Erases a line on a layer.
void EraseArc (ArcType *)
 Erases an arc on a layer.
void EraseText (LayerType *, TextType *)
 Erases a text on a layer.
void ErasePolygon (PolygonType *)
 Erases a polygon on a layer.
void EraseElement (ElementType *)
 Erases an element.
void EraseElementPinsAndPads (ElementType *)
 Erases all pins and pads of an element.
void EraseElementName (ElementType *)
 Erases the name of an element.
void EraseObject (int, void *, void *)
void DrawLayerGroup (int side, const BoxType *drawn_area)
 Draws one layer group.
void DrawPaste (int side, const BoxType *drawn_area)
 Draws solder paste layer for a given side of the board.
void DrawSilk (int side, const BoxType *drawn_area)
 Draws silk layer.
void DrawMask (int side, const BoxType *drawn_area)
 Draws solder mask layer - this will cover nearly everything.
void DrawHoles (bool draw_plated, bool draw_unplated, const BoxType *drawn_area, Cardinal g_from, Cardinal g_to)
void PrintAssembly (int side, const BoxType *drawn_area)
 Prints assembly drawing.

Detailed Description

Prototypes for drawing routines.


Copyright.


PCB, interactive printed circuit board design

Copyright (C) 1994,1995,1996, 2004 Thomas Nau

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Contact addresses for paper mail and Email: Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany Thomas.Nau@rz.uni-ulm.de

Definition in file draw.h.


Function Documentation

void Draw ( void  )

Initiate the actual redrawing of the updated area.

Definition at line 130 of file draw.c.

References gui, hid_st::invalidate_lr, MAXINT, BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.

Referenced by ActionAddRats(), ActionChangeName(), ActionConnection(), ActionDisplay(), ActionFlip(), ActionMorphPolygon(), ActionSelect(), ActionSetThermal(), ActionToggleHideName(), ActionUnselect(), AddAllRats(), ChangeHole(), ChangeObject2ndSize(), ChangeObjectClearSize(), ChangeObjectJoin(), ChangeObjectMaskSize(), ChangeObjectName(), ChangeObjectOctagon(), ChangeObjectSize(), ChangeObjectSquare(), ChangeObjectThermal(), ChangeObjectViaLayers(), ChangePaste(), ChangeSelected2ndSize(), ChangeSelectedClearSize(), ChangeSelectedElementSide(), ChangeSelectedHole(), ChangeSelectedJoin(), ChangeSelectedOctagon(), ChangeSelectedPaste(), ChangeSelectedSize(), ChangeSelectedSquare(), ChangeSelectedThermals(), ChangeSelectedViaLayers(), ClearWarnings(), ClosePolygon(), ClrObjectJoin(), ClrObjectOctagon(), ClrObjectSquare(), ClrSelectedJoin(), ClrSelectedOctagon(), ClrSelectedSquare(), CopyPastebufferToLayout(), DeleteRats(), DoIt(), DRCAll(), escape(), InsertPointIntoLine(), InsertPointIntoPolygon(), InsertPointIntoRat(), LookupConnection(), LookupElementConnections(), LookupUnusedPins(), MoveArc(), MoveArcToLayer(), MoveElement(), MoveElementName(), MoveLine(), MoveLinePoint(), MoveLineToLayer(), MovePolygon(), MovePolygonPoint(), MovePolygonToLayer(), MoveRatToLayer(), MoveText(), MoveTextToLayer(), MoveVia(), nbcb_select_common(), netlist_select_cb(), NotifyMode(), QueryInputAndChangeObjectName(), Redo(), RemoveArc(), RemoveElement(), RemoveLine(), RemovePolygon(), RemovePolygonContour(), RemovePolygonPoint(), RemoveRat(), RemoveSelected(), RemoveText(), RemoveVia(), RotateArc(), RotateElement(), RotateElementName(), RotateLinePoint(), RotateObject(), RotateText(), RouteAll(), SelectBlock(), selection_changed_cb(), SelectObject(), SetMode(), SetObjectJoin(), SetObjectOctagon(), SetObjectSquare(), SetSelectedJoin(), SetSelectedOctagon(), SetSelectedSquare(), TracePath(), and Undo().

void DrawArc ( LayerType ,
ArcType  
)
void DrawElement ( ElementType )

Draws an element.

Definition at line 1342 of file draw.c.

References DrawElementName(), DrawElementPackage(), and DrawElementPinsAndPads().

Referenced by ChangeElementSide(), ChangeElementSize(), DrawObject(), DRCAll(), NotifyMode(), RotateElement(), SelectBlock(), and UndoMirror().

Here is the call graph for this function:

void DrawElementName ( ElementType )

Draws the name of an element.

Definition at line 1353 of file draw.c.

References DrawText(), ELEMENT_TEXT, PCB, and TEST_FLAG.

Referenced by ActionDisplay(), ActionToggleHideName(), ChangeElementNameSize(), ChangeElementText(), CopyElement(), DrawElement(), DrawObject(), MoveElement(), MoveElementName(), NotifyMode(), RotateElementName(), SelectBlock(), and SelectObject().

Here is the call graph for this function:

void DrawElementPackage ( ElementType )

Draws the package of an element.

Definition at line 1364 of file draw.c.

References ARC_LOOP, DrawArc(), DrawLine(), ELEMENTLINE_LOOP, END_LOOP, and line.

Referenced by CopyElement(), DrawElement(), MoveElement(), and SelectObject().

Here is the call graph for this function:

void DrawElementPinsAndPads ( ElementType )

Draw pins of an element.

Definition at line 1382 of file draw.c.

References doing_assy, doing_pinout, DrawPad(), DrawPin(), END_LOOP, FRONT, PCBType::InvisibleObjectsOn, PAD_LOOP, PCB, pin, and PIN_LOOP.

Referenced by CopyElement(), DrawElement(), MoveElement(), and SelectObject().

Here is the call graph for this function:

void DrawHoles ( bool  draw_plated,
bool  draw_unplated,
const BoxType drawn_area,
Cardinal  g_from,
Cardinal  g_to 
)

Definition at line 498 of file draw.c.

References current_layergroup, PCBType::Data, hole_callback(), PCB, DataType::pin_tree, hole_info::plated, r_search(), and DataType::via_tree.

Referenced by DrawEverything().

Here is the call graph for this function:

void DrawLayerGroup ( int  group,
const BoxType drawn_area 
)

Draws one layer group.

If the exporter is not a GUI, also draws the pins / pads / vias in this layer group.

Definition at line 1128 of file draw.c.

References PCBType::Data, DrawLayer(), DrawPPV(), LayerGroupType::Entries, hid_st::gui, gui, DataType::Layer, Layer, PCBType::LayerGroups, layers, LayerType::Name, LayerGroupType::Number, and PCB.

Referenced by DrawEverything(), and PrintAssembly().

Here is the call graph for this function:

void DrawMask ( int  side,
const BoxType drawn_area 
)
void DrawPadName ( PadType )

Draws the name of a pad.

Definition at line 1271 of file draw.c.

References GatherPadName().

Referenced by ActionDisplay(), ChangePadName(), and DrawPad().

Here is the call graph for this function:

void DrawPaste ( int  side,
const BoxType drawn_area 
)

Draws solder paste layer for a given side of the board.

Definition at line 1015 of file draw.c.

References _draw_pad(), ALLPAD_LOOP, COORD_TO_MM, PCBType::Data, PCBType::ElementColor, ENDALL_LOOP, OutputType::fgGC, hid_st::graphics, gui, ON_SIDE, Output, SettingType::PasteAdjust, PCB, hid_draw_st::set_color, Settings, and TEST_FLAG.

Referenced by DrawEverything().

Here is the call graph for this function:

void DrawPinName ( PinType )

Draws the name of a pin.

Definition at line 1251 of file draw.c.

References GatherPVName().

Referenced by ActionDisplay(), ChangePinName(), ChangeViaName(), and DrawPin().

Here is the call graph for this function:

void DrawText ( LayerType ,
TextType  
)

Draws a text on a layer.

Definition at line 1323 of file draw.c.

References AddPart().

Referenced by ChangeTextJoin(), ChangeTextName(), ChangeTextSize(), CopyText(), DrawElementName(), DrawObject(), MoveText(), MoveTextToLayer(), NotifyMode(), RotateText(), SelectBlock(), and SelectObject().

Here is the call graph for this function:

void DrawViaName ( PinType )

Draws the name of a via.

Definition at line 1230 of file draw.c.

References GatherPVName().

Referenced by ActionDisplay(), and DrawVia().

Here is the call graph for this function:

void EraseArc ( ArcType )

Erases an arc on a layer.

Definition at line 1493 of file draw.c.

References AddPart(), and ArcType::Thickness.

Referenced by ChangeArcClearSize(), ChangeArcJoin(), ChangeArcSize(), EraseElement(), EraseObject(), MoveArc(), MoveArcToLayer(), RemoveArc(), and RotateArc().

Here is the call graph for this function:

void EraseElement ( ElementType )

Erases an element.

Definition at line 1523 of file draw.c.

References ARC_LOOP, ELEMENTLINE_LOOP, END_LOOP, EraseArc(), EraseElementName(), EraseElementPinsAndPads(), EraseLine(), and line.

Referenced by ChangeElementSide(), ChangeElementSize(), EraseObject(), MoveElement(), RemoveElement(), RotateElement(), and UndoMirror().

Here is the call graph for this function:

void EraseElementName ( ElementType )

Erases the name of an element.

Definition at line 1561 of file draw.c.

References ELEMENT_TEXT, EraseText(), PCB, and TEST_FLAG.

Referenced by ActionDisplay(), ActionToggleHideName(), ChangeElementNameSize(), ChangeElementText(), EraseElement(), EraseObject(), MoveElementName(), NotifyMode(), and RotateElementName().

Here is the call graph for this function:

void EraseElementPinsAndPads ( ElementType )

Erases all pins and pads of an element.

Definition at line 1543 of file draw.c.

References END_LOOP, ErasePad(), ErasePin(), PAD_LOOP, pin, and PIN_LOOP.

Referenced by EraseElement(), and MoveElement().

Here is the call graph for this function:

void EraseLine ( LineType )

Erases a line on a layer.

Definition at line 1484 of file draw.c.

References AddPart().

Referenced by ChangeLineClearSize(), ChangeLineJoin(), ChangeLineSize(), EraseElement(), EraseObject(), EraseRat(), InsertPointIntoLine(), MoveLine(), MoveLinePoint(), MoveLineToLayer(), RemoveLine(), ripout_livedraw_obj(), RotateLinePoint(), and RotateObject().

Here is the call graph for this function:

void EraseObject ( int  ,
void *  ,
void *   
)
void ErasePad ( PadType )

Erase a pad object.

Definition at line 1444 of file draw.c.

References AddPart(), ErasePadName(), and TEST_FLAG.

Referenced by ChangePadClearSize(), ChangePadMaskSize(), ChangePadSize(), ChangePadSquare(), ChangePaste(), EraseElementPinsAndPads(), and EraseObject().

Here is the call graph for this function:

void ErasePadName ( PadType )

Erase a pad name.

Definition at line 1455 of file draw.c.

References GatherPadName().

Referenced by ActionDisplay(), ChangePadName(), and ErasePad().

Here is the call graph for this function:

void ErasePin ( PinType )

Erase a pin object.

Definition at line 1464 of file draw.c.

References AddPart(), ErasePinName(), and TEST_FLAG.

Referenced by ChangeElement2ndSize(), ChangePin2ndSize(), ChangePinClearSize(), ChangePinMaskSize(), ChangePinOctagon(), ChangePinSize(), ChangePinSquare(), EraseElementPinsAndPads(), and EraseObject().

Here is the call graph for this function:

void ErasePinName ( PinType )

Erase a pin name.

Definition at line 1475 of file draw.c.

References GatherPVName().

Referenced by ActionDisplay(), ChangePinName(), ChangeViaName(), and ErasePin().

Here is the call graph for this function:

void ErasePolygon ( PolygonType )

Erases a polygon on a layer.

Definition at line 1514 of file draw.c.

References AddPart().

Referenced by EraseObject(), InsertPointIntoPolygon(), MorphPolygon(), MovePolygon(), MovePolygonPoint(), MovePolygonToLayer(), RemovePolygon(), RemovePolygonContour(), RemovePolygonPoint(), UndoInsertPoint(), and UndoRemovePoint().

Here is the call graph for this function:

void EraseRat ( RatType )

Erase a ratline.

Definition at line 1412 of file draw.c.

References AddPart(), EraseLine(), TEST_FLAG, BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.

Referenced by ActionChangeName(), InsertPointIntoRat(), MoveLinePoint(), MoveRatToLayer(), NotifyMode(), and RemoveRat().

Here is the call graph for this function:

void EraseText ( LayerType ,
TextType  
)

Erases a text on a layer.

Definition at line 1504 of file draw.c.

References AddPart().

Referenced by ChangeTextJoin(), ChangeTextName(), ChangeTextSize(), EraseElementName(), EraseObject(), MoveText(), MoveTextToLayer(), RemoveText(), and RotateText().

Here is the call graph for this function:

void EraseVia ( PinType )

Erase a via.

Definition at line 1401 of file draw.c.

References AddPart(), EraseViaName(), and TEST_FLAG.

Referenced by ChangeHole(), ChangeVia2ndSize(), ChangeViaClearSize(), ChangeViaMaskSize(), ChangeViaOctagon(), ChangeViaSize(), MoveVia(), RemoveVia(), and ripout_livedraw_obj().

Here is the call graph for this function:

void EraseViaName ( PinType )

Erase a via name.

Definition at line 1435 of file draw.c.

References GatherPVName().

Referenced by ActionDisplay(), and EraseVia().

Here is the call graph for this function:

void PrintAssembly ( int  side,
const BoxType drawn_area 
)

Prints assembly drawing.

Definition at line 603 of file draw.c.

References doing_assy, DrawLayerGroup(), DrawSilk(), OutputType::fgGC, GetLayerGroupNumberBySide(), hid_st::graphics, gui, Output, and hid_draw_st::set_draw_faded.

Referenced by DrawEverything().

Here is the call graph for this function:

void Redraw ( void  )