MCPcopy Create free account
hub / github.com/MayaPosch/NymphCast / rasterizeAt

Method rasterizeAt

src/server/gui/core/resources/TextureResource.cpp:149–160  ·  view source on GitHub ↗

For scalable source images in textures we want to set the resolution to rasterize at

Source from the content-addressed store, hash-verified

147
148// For scalable source images in textures we want to set the resolution to rasterize at
149void TextureResource::rasterizeAt(size_t width, size_t height)
150{
151 std::shared_ptr<TextureData> data;
152 if (mTextureData != nullptr)
153 data = mTextureData;
154 else
155 data = sTextureDataManager.get(this);
156 mSourceSize = Vector2f((float)width, (float)height);
157 data->setSourceSize((float)width, (float)height);
158 if (mForceLoad || (mTextureData != nullptr))
159 data->load();
160}
161
162Vector2f TextureResource::getSourceImageSize() const
163{

Callers 2

resizeMethod · 0.80
onSizeChangedMethod · 0.80

Calls 4

setSourceSizeMethod · 0.80
Vector2fClass · 0.50
getMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected