14 return VECTOR2D((
float)t.x, (
float)t.y);
21 auto pa =
xform2 ( minv, p0 );
22 auto pb =
xform2 ( minv, p1 );
27 m_currentManager->Reserve( 6 );
28 m_currentManager->Shader( SHADER_NONE );
29 m_currentManager->Color( m_strokeColor.r, m_strokeColor.g, m_strokeColor.b, m_strokeColor.a );
31 m_currentManager->Shader( SHADER_NONE ); m_currentManager->Vertex( pa.x, pa.y, m_layerDepth );
32 m_currentManager->Shader( SHADER_NONE ); m_currentManager->Vertex( pb.x, pb.y, m_layerDepth );
33 m_currentManager->Shader( SHADER_NONE ); m_currentManager->Vertex( pc.x, pc.y, m_layerDepth );
34 m_currentManager->Shader( SHADER_NONE ); m_currentManager->Vertex( pa.x, pa.y, m_layerDepth );
35 m_currentManager->Shader( SHADER_NONE ); m_currentManager->Vertex( pc.x, pc.y, m_layerDepth );
36 m_currentManager->Shader( SHADER_NONE ); m_currentManager->Vertex( pd.x, pd.y, m_layerDepth );
50 auto pa =
xform2 ( minv, p0 );
66 return wxT(
"MyDrawing" );
70 virtual void Show(
int nestLevel, std::ostream& os )
const override {}
82 auto gal = aView->
GetGAL();
84 gal->SetIsStroke(
true );
85 gal->SetStrokeColor( COLOR4D::WHITE );
107 for(
int step = 10; step < 80; step += 11, k+=100)
109 for (
int i = 0; i < 100; i++)
117 auto p0 =
VECTOR2D( k + 100, 100 + i * step );
118 auto p1 =
VECTOR2D( k + 100 + step/2, 100 + i * step );
119 auto p2 =
VECTOR2D( k + 100 + step/2, 100 + i * step + step/2 );
120 auto p3 =
VECTOR2D( k + 100, 100 + i * step + step/2 );
171 for(
int i = 1; i < 16; i+=1)
173 for(
int j = 1; j < 16; j+=1)
175 gal->SetIsStroke(
true );
176 gal->SetIsFill(
false );
178 gal->SetIsStroke(
false );
179 gal->SetIsFill(
true );
195 const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
196 long style = wxDEFAULT_FRAME_STYLE )
197 : PCB_TEST_FRAME( frame, title, pos, size, style,
PCB_DRAW_PANEL_GAL::GAL_TYPE_OPENGL )
201 m_galPanel->GetView()->SetScale( 41.3526000000,
VECTOR2D( 837362.6373626292, 1581684.9816849837 ) );
216 if( aFileName !=
"" )
218 frame->LoadAndDisplayBoard( aFileName );
226 m_toolManager->InitTools();
constexpr void SetMaximum()
A base class for most all the KiCad significant classes used in schematics and boards.
Abstract interface for drawing on a 2D-surface.
const MATRIX3x3D & GetScreenWorldMatrix() const
Get the screen <-> world transformation matrix.
virtual void DrawCircle(const VECTOR2D &aCenterPoint, double aRadius)
Draw a circle using world coordinates.
virtual void SetLineWidth(float aLineWidth)
Set the line width.
virtual void DrawLine(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint)
Draw a line.
virtual void SetTarget(RENDER_TARGET aTarget)
Set the target for rendering.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
GAL * GetGAL() const
Return the #GAL this view is using to draw graphical primitives.
const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
wxString GetClass() const override
Return the class name.
virtual void ViewDraw(int aLayer, KIGFX::VIEW *aView) const override
Draw the parts of the object belonging to layer aLayer.
virtual std::vector< int > ViewGetLayers() const override
Return the all the layers within the VIEW the object is painted on.
MY_PCB_TEST_FRAME(wxFrame *frame, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE)
virtual ~MY_PCB_TEST_FRAME()
@ LAYER_GP_OVERLAY
general purpose overlay
@ TARGET_NONCACHED
Auxiliary rendering target (noncached)
wxFrame * CreateMainFrame(const std::string &aFileName)
const VECTOR2D xform2(const MATRIX3x3D &minv, const VECTOR2D &p)
void screenSpaceCircle(KIGFX::GAL *gal, const VECTOR2D &p0, double r, double w)
void screenSpaceLine(KIGFX::GAL *gal, const VECTOR2D &p0, const VECTOR2D &p1, double w)
@ NOT_USED
the 3d code uses this value
VECTOR2< double > VECTOR2D