MCPcopy Create free account
hub / github.com/Cpasjuste/pplay / VideoTexture

Method VideoTexture

src/player/video_texture.cpp:10–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8using namespace c2d;
9
10VideoTexture::VideoTexture(Main *m, const c2d::Vector2f &size) : GLTextureBuffer(size, Format::RGBA8) {
11 main = m;
12
13 // fade
14 fade = new C2DTexture(main->getIo()->getRomFsPath() + "skin/fade.png");
15 fade->setScale(size.x / fade->getSize().x, size.y / fade->getSize().y);
16 fade->setFillColor(Color::Black);
17 fade->setAlpha(0);
18 fadeTween = new TweenAlpha(0, 255, 0.5f);
19 fade->add(fadeTween);
20 GLTextureBuffer::add(fade);
21}
22
23int VideoTexture::resize(const Vector2i &size, bool keepPixels) {
24 fade->setScale((float) size.x / fade->getSize().x, (float) size.y / fade->getSize().y);

Callers

nothing calls this directly

Calls 3

getRomFsPathMethod · 0.80
setFillColorMethod · 0.45
setAlphaMethod · 0.45

Tested by

no test coverage detected