MCPcopy Create free account
hub / github.com/LibreSprite/LibreSprite / drawLine

Method drawLine

src/app/ui/editor/editor.cpp:113–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111 }
112
113 void drawLine(int x1, int y1, int x2, int y2, gfx::Color screenColor) override {
114 gfx::Point a(x1, y1);
115 gfx::Point b(x2, y2);
116 a = m_editor->editorToScreen(a);
117 b = m_editor->editorToScreen(b);
118 gfx::Rect bounds = m_editor->bounds();
119 a.x -= bounds.x;
120 a.y -= bounds.y;
121 b.x -= bounds.x;
122 b.y -= bounds.y;
123 m_g->drawLine(screenColor, a, b);
124 }
125
126 void drawRectXor(const gfx::Rect& rc) override {
127 gfx::Rect rc2 = m_editor->editorToScreen(rc);

Callers 2

draw_colorFunction · 0.45
postRenderDecoratorMethod · 0.45

Calls 2

editorToScreenMethod · 0.80
boundsMethod · 0.45

Tested by

no test coverage detected