MCPcopy Create free account
hub / github.com/DISTRHO/DPF / draw

Method draw

dgl/src/Cairo.cpp:83–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81
82template<typename T>
83void Line<T>::draw(const GraphicsContext& context, const T width)
84{
85 DISTRHO_SAFE_ASSERT_RETURN(posStart != posEnd,);
86 DISTRHO_SAFE_ASSERT_RETURN(width != 0,);
87
88 cairo_t* const handle = static_cast<const CairoGraphicsContext&>(context).handle;
89
90 cairo_set_line_width(handle, width);
91 cairo_move_to(handle, posStart.getX(), posStart.getY());
92 cairo_line_to(handle, posEnd.getX(), posEnd.getY());
93 cairo_stroke(handle);
94}
95
96#ifdef DGL_ALLOW_DEPRECATED_METHODS
97template<typename T>

Callers 1

onDisplayMethod · 0.45

Calls 2

notImplementedFunction · 0.70
drawRectangleFunction · 0.70

Tested by

no test coverage detected