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

Method Page

src/SFML/Graphics/Font.cpp:807–824  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

805
806////////////////////////////////////////////////////////////
807Font::Page::Page(bool smooth)
808{
809 // Make sure that the texture is initialized by default
810 Image image({128, 128}, Color::Transparent);
811
812 // Reserve a 2x2 white square for texturing underlines
813 for (unsigned int x = 0; x < 2; ++x)
814 for (unsigned int y = 0; y < 2; ++y)
815 image.setPixel({x, y}, Color::White);
816
817 // Create the texture
818 if (!texture.loadFromImage(image))
819 {
820 err() << "Failed to load font page texture" << std::endl;
821 }
822
823 texture.setSmooth(smooth);
824}
825
826
827////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 3

setPixelMethod · 0.80
loadFromImageMethod · 0.80
setSmoothMethod · 0.45

Tested by

no test coverage detected