MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / UpdateBitmap

Method UpdateBitmap

src/subs_preview.cpp:103–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103void SubtitlesPreview::UpdateBitmap() {
104 if (!vid) return;
105
106 VideoFrame frame;
107 vid->GetFrame(0, frame);
108
109 if (provider) {
110 try {
111 provider->LoadSubtitles(sub_file.get());
112 provider->DrawSubtitles(frame, 0.1);
113 }
114 catch (...) { }
115 }
116
117 // Convert frame to bitmap
118 *bmp = static_cast<wxBitmap>(GetImage(frame));
119 Refresh();
120}
121
122void SubtitlesPreview::OnPaint(wxPaintEvent &) {
123 wxPaintDC(this).DrawBitmap(*bmp, 0, 0);

Callers

nothing calls this directly

Calls 5

GetImageFunction · 0.85
GetFrameMethod · 0.45
LoadSubtitlesMethod · 0.45
getMethod · 0.45
DrawSubtitlesMethod · 0.45

Tested by

no test coverage detected