MCPcopy Create free account
hub / github.com/SFML/SFML / draw

Method draw

src/SFML/Graphics/Shape.cpp:254–269  ·  view source on GitHub ↗

///////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

252
253////////////////////////////////////////////////////////////
254void Shape::draw(RenderTarget& target, RenderStates states) const
255{
256 states.transform *= getTransform();
257 states.coordinateType = CoordinateType::Pixels;
258
259 // Render the inside
260 states.texture = m_texture;
261 target.draw(m_vertices, states);
262
263 // Render the outline
264 if (m_outlineThickness != 0)
265 {
266 states.texture = nullptr;
267 target.draw(m_outlineVertices, states);
268 }
269}
270
271
272////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected