13 #include <sys/ioctl.h>
15 #include <sys/unistd.h>
25 double p = V * (1 - S);
26 double q = V * (1 - S * f);
27 double t = V * (1 - S * (1 - f));
45 double f = fabs(
constrain(Factor, -1.0, 1.0));
46 double w = Factor > 0 ? f * 0xFF : 0;
47 return (Color & 0xFF000000) |
48 (
min(0xFF,
int((1 - f) * ((Color >> 16) & 0xFF) + w + 0.5)) << 16) |
49 (
min(0xFF,
int((1 - f) * ((Color >> 8) & 0xFF) + w + 0.5)) << 8) |
50 (
min(0xFF,
int((1 - f) * ( Color & 0xFF) + w + 0.5)) );
65 for (
int alphaA = 0; alphaA < 255; alphaA++) {
66 int range = (alphaA == 255 ? 255 : 254);
67 for (
int alphaB = 0; alphaB < 256; alphaB++) {
68 int alphaO_x_range = 255 * alphaA + alphaB * (range - alphaA);
71 int factorA = (256 * 255 * alphaA + alphaO_x_range / 2) / alphaO_x_range;
72 int factorB = (256 * alphaB * (range - alphaA) + alphaO_x_range / 2) / alphaO_x_range;
83 tColor Alpha = (ColorFg & 0xFF000000) >> 24;
86 uint16_t *lut = &
AlphaLutFactors[Alpha][(ColorBg & 0xFF000000) >> 24][0];
88 | (((((ColorFg & 0x00FF00FF) * lut[0] + (ColorBg & 0x00FF00FF) * lut[1])) & 0xFF00FF00)
89 | ((((ColorFg & 0x0000FF00) * lut[0] + (ColorBg & 0x0000FF00) * lut[1])) & 0x00FF0000)) >> 8);
97 tColor RB = (Color & 0x00FF00FF) * Alpha;
98 RB = ((RB + ((RB >> 8) & 0x00FF00FF) + 0x00800080) >> 8) & 0x00FF00FF;
99 tColor AG = ((Color >> 8) & 0x00FF00FF) * Alpha;
100 AG = ((AG + ((AG >> 8) & 0x00FF00FF) + 0x00800080)) & 0xFF00FF00;
106 tColor Alpha = (ColorFg & 0xFF000000) >> 24;
109 Alpha = ((Alpha + ((Alpha >> 8) & 0x000000FF) + 0x00000080) >> 8) & 0x000000FF;
111 return Multiply(ColorFg, Alpha) + Multiply(ColorBg, 255 - Alpha);
133 int ColorsPerBlend = ColorsForBlending / BlendColors + 2;
148 if (
color[i] == Color)
193 for (
int i = 0; i < Palette.
numColors; i++) {
195 if (ColorFg || ColorBg) {
197 case 0: Color = ColorBg;
break;
198 case 1: Color = ColorFg;
break;
202 int n =
Index(Color);
210 for (
int i = 0; i < Palette.
numColors; i++)
220 int Af = (ColorFg & 0xFF000000) >> 24;
221 int Rf = (ColorFg & 0x00FF0000) >> 16;
222 int Gf = (ColorFg & 0x0000FF00) >> 8;
223 int Bf = (ColorFg & 0x000000FF);
224 int Ab = (ColorBg & 0xFF000000) >> 24;
225 int Rb = (ColorBg & 0x00FF0000) >> 16;
226 int Gb = (ColorBg & 0x0000FF00) >> 8;
227 int Bb = (ColorBg & 0x000000FF);
228 int A = (Ab + (Af - Ab) * Level / 0xFF) & 0xFF;
229 int R = (Rb + (Rf - Rb) * Level / 0xFF) & 0xFF;
230 int G = (Gb + (Gf - Gb) * Level / 0xFF) & 0xFF;
231 int B = (Bb + (Bf - Bb) * Level / 0xFF) & 0xFF;
232 return (A << 24) | (R << 16) | (G << 8) | B;
239 int A1 = (Color & 0xFF000000) >> 24;
240 int R1 = (Color & 0x00FF0000) >> 16;
241 int G1 = (Color & 0x0000FF00) >> 8;
242 int B1 = (Color & 0x000000FF);
243 for (
int i = 0; i < numColors && d > 0; i++) {
244 int A2 = (
color[i] & 0xFF000000) >> 24;
245 int R2 = (
color[i] & 0x00FF0000) >> 16;
246 int G2 = (
color[i] & 0x0000FF00) >> 8;
247 int B2 = (
color[i] & 0x000000FF);
250 diff = (abs(A1 - A2) << 1) + (abs(R1 - R2) << 1) + (abs(G1 - G2) << 1) + (abs(B1 - B2) << 1);
256 return d <= MaxDiff ? n : -1;
311 esyslog(
"ERROR: can't allocate bitmap!");
321 return 0 <= x && x <
width && 0 <= y && y <
height;
330 return x1 <= 0 && y1 <= 0 && x2 >=
width - 1 && y2 >=
height - 1;
339 return !(x2 < 0 || x1 >=
width || y2 < 0 || y1 >=
height);
365 FILE *f = fopen(FileName,
"r");
373 while ((s = ReadLine.
Read(f)) != NULL) {
376 if (strcmp(s,
"/* XPM */") != 0) {
377 esyslog(
"ERROR: invalid header in XPM file '%s'", FileName);
382 else if (*s++ ==
'"') {
385 if (4 != sscanf(s,
"%d %d %d %d", &w, &h, &n, &c)) {
386 esyslog(
"ERROR: faulty 'values' line in XPM file '%s'", FileName);
391 Xpm =
MALLOC(
char *, lines);
392 memset(Xpm, 0, lines *
sizeof(
char*));
394 char *q = strchr(s,
'"');
396 esyslog(
"ERROR: missing quotes in XPM file '%s'", FileName);
402 Xpm[index++] = strdup(s);
404 esyslog(
"ERROR: too many lines in XPM file '%s'", FileName);
414 esyslog(
"ERROR: too few lines in XPM file '%s'", FileName);
417 for (
int i = 0; i < index; i++)
424 esyslog(
"ERROR: can't open XPM file '%s'", FileName);
432 const char *
const *p = Xpm;
434 if (4 != sscanf(*p,
"%d %d %d %d", &w, &h, &n, &c)) {
435 esyslog(
"ERROR: faulty 'values' line in XPM: '%s'", *p);
439 esyslog(
"ERROR: too many colors in XPM: %d", n);
443 while (1 << (1 << b) < (IgnoreNone ? n - 1 : n))
448 for (
int i = 0; i < n; i++) {
449 const char *s = *++p;
450 if (
int(strlen(s)) < c) {
451 esyslog(
"ERROR: faulty 'colors' line in XPM: '%s'", s);
456 esyslog(
"ERROR: unknown color key in XPM: '%c'", *s);
460 if (strcasecmp(s,
"none") == 0) {
467 esyslog(
"ERROR: unknown color code in XPM: '%c'", *s);
470 tColor color = strtoul(++s, NULL, 16) | 0xFF000000;
471 SetColor((IgnoreNone && i > NoneColorIndex) ? i - 1 : i,
color);
473 for (
int y = 0; y < h; y++) {
474 const char *s = *++p;
475 if (
int(strlen(s)) != w * c) {
476 esyslog(
"ERROR: faulty pixel line in XPM: %d '%s'", y, s);
479 for (
int x = 0; x < w; x++) {
480 for (
int i = 0; i <= n; i++) {
482 esyslog(
"ERROR: undefined pixel color in XPM: %d %d '%s'", x, y, s);
485 if (strncmp(Xpm[i + 1], s, c) == 0) {
486 if (i == NoneColorIndex)
488 SetIndex(x, y, (IgnoreNone && i > NoneColorIndex) ? i - 1 : i);
542 for (
int ix = 0; ix < Bitmap.
width; ix++) {
543 for (
int iy = 0; iy < Bitmap.
height; iy++) {
544 if (!Overlay || Bitmap.
bitmap[Bitmap.
width * iy + ix] != 0)
551 Take(Bitmap, &Indexes, ColorFg, ColorBg);
552 for (
int ix = 0; ix < Bitmap.
width; ix++) {
553 for (
int iy = 0; iy < Bitmap.
height; iy++) {
554 if (!Overlay || Bitmap.
bitmap[Bitmap.
width * iy + ix] != 0)
570 if (!
Intersects(x, y, x + cw - 1, y + ch - 1))
577 if ((Alignment &
taLeft) != 0) {
581 else if ((Alignment &
taRight) != 0) {
589 x += (
Width - w) / 2;
593 if ((Alignment &
taTop) != 0)
595 else if ((Alignment &
taBottom) != 0) {
614 if (
Covers(x1, y1, x2, y2))
625 for (
int y = y1; y <= y2; y++) {
626 for (
int x = x1; x <= x2; x++)
639 int cx = (x1 + x2) / 2;
640 int cy = (y1 + y2) / 2;
641 switch (abs(Quadrants)) {
642 case 0: rx /= 2; ry /= 2;
break;
643 case 1: cx = x1; cy = y2;
break;
644 case 2: cx = x2; cy = y2;
break;
645 case 3: cx = x2; cy = y1;
break;
646 case 4: cx = x1; cy = y1;
break;
647 case 5: cx = x1; ry /= 2;
break;
648 case 6: cy = y2; rx /= 2;
break;
649 case 7: cx = x2; ry /= 2;
break;
650 case 8: cy = y1; rx /= 2;
break;
653 int TwoASquare =
max(1, 2 * rx * rx);
654 int TwoBSquare =
max(1, 2 * ry * ry);
657 int XChange = ry * ry * (1 - 2 * rx);
658 int YChange = rx * rx;
659 int EllipseError = 0;
660 int StoppingX = TwoBSquare * rx;
662 while (StoppingX >= StoppingY) {
665 case 1:
DrawRectangle(cx, cy - y, cx + x, cy - y, Color);
break;
667 case 2:
DrawRectangle(cx - x, cy - y, cx, cy - y, Color);
break;
668 case 3:
DrawRectangle(cx - x, cy + y, cx, cy + y, Color);
break;
669 case 4:
DrawRectangle(cx, cy + y, cx + x, cy + y, Color);
break;
671 case 6:
DrawRectangle(cx - x, cy - y, cx + x, cy - y, Color);
if (Quadrants == 6)
break;
672 case 8:
DrawRectangle(cx - x, cy + y, cx + x, cy + y, Color);
break;
673 case -1:
DrawRectangle(cx + x, cy - y, x2, cy - y, Color);
break;
674 case -2:
DrawRectangle(x1, cy - y, cx - x, cy - y, Color);
break;
675 case -3:
DrawRectangle(x1, cy + y, cx - x, cy + y, Color);
break;
676 case -4:
DrawRectangle(cx + x, cy + y, x2, cy + y, Color);
break;
680 StoppingY += TwoASquare;
681 EllipseError += YChange;
682 YChange += TwoASquare;
683 if (2 * EllipseError + XChange > 0) {
685 StoppingX -= TwoBSquare;
686 EllipseError += XChange;
687 XChange += TwoBSquare;
693 YChange = rx * rx * (1 - 2 * ry);
696 StoppingY = TwoASquare * ry;
697 while (StoppingX <= StoppingY) {
700 case 1:
DrawRectangle(cx, cy - y, cx + x, cy - y, Color);
break;
702 case 2:
DrawRectangle(cx - x, cy - y, cx, cy - y, Color);
break;
703 case 3:
DrawRectangle(cx - x, cy + y, cx, cy + y, Color);
break;
704 case 4:
DrawRectangle(cx, cy + y, cx + x, cy + y, Color);
break;
706 case 6:
DrawRectangle(cx - x, cy - y, cx + x, cy - y, Color);
if (Quadrants == 6)
break;
707 case 8:
DrawRectangle(cx - x, cy + y, cx + x, cy + y, Color);
break;
708 case -1:
DrawRectangle(cx + x, cy - y, x2, cy - y, Color);
break;
709 case -2:
DrawRectangle(x1, cy - y, cx - x, cy - y, Color);
break;
710 case -3:
DrawRectangle(x1, cy + y, cx - x, cy + y, Color);
break;
711 case -4:
DrawRectangle(cx + x, cy + y, x2, cy + y, Color);
break;
715 StoppingX += TwoBSquare;
716 EllipseError += XChange;
717 XChange += TwoBSquare;
718 if (2 * EllipseError + YChange > 0) {
720 StoppingY -= TwoASquare;
721 EllipseError += YChange;
722 YChange += TwoASquare;
731 bool upper = Type & 0x01;
732 bool falling = Type & 0x02;
733 bool vertical = Type & 0x04;
735 for (
int y = y1; y <= y2; y++) {
736 double c = cos((y - y1) * M_PI / (y2 - y1 + 1));
739 int x = int((x2 - x1 + 1) * c / 2);
740 if (upper && !falling || !upper && falling)
747 for (
int x = x1; x <= x2; x++) {
748 double c = cos((x - x1) * M_PI / (x2 - x1 + 1));
751 int y = int((y2 - y1 + 1) * c / 2);
767 int NewBpp = Palette.
Bpp();
768 if (
Bpp() == 4 && NewBpp == 2) {
771 bitmap[i] = (p >> 2) | ((p & 0x03) != 0);
774 else if (
Bpp() == 8) {
778 bitmap[i] = (p >> 6) | ((p & 0x30) != 0);
781 else if (NewBpp == 4) {
806 int MaxNewColors = (NewBpp == 4) ? 16 : 4;
808 for (
int i = 0; i < MaxNewColors; i++) {
811 for (
int n = 0; n < NumOldColors; n++) {
826 for (
int n = 0; n < NumOldColors; n++) {
842 int w =
max(1,
int(round(
Width() * FactorX)));
843 int h =
max(1,
int(round(
Height() * FactorY)));
847 if (!AntiAlias || FactorX <= 1.0 && FactorY <= 1.0) {
852 for (
int y = 0; y < b->
Height(); y++) {
856 for (
int x = 0; x < b->
Width(); x++) {
857 *Dest++ = SourceRow[SourceX >> 16];
861 DestRow += b->
Width();
869 for (
int y = 0; y < b->
Height(); y++) {
871 int sy =
min(SourceY >> 16,
Height() - 2);
872 uint8_t BlendY = 0xFF - ((SourceY >> 8) & 0xFF);
873 for (
int x = 0; x < b->
Width(); x++) {
874 int sx =
min(SourceX >> 16,
Width() - 2);
875 uint8_t BlendX = 0xFF - ((SourceX >> 8) & 0xFF);
876 tColor c1 = b->
Blend(GetColor(sx, sy), GetColor(sx + 1, sy), BlendX);
877 tColor c2 = b->
Blend(GetColor(sx, sy + 1), GetColor(sx + 1, sy + 1), BlendX);
925 if (!IsEmpty() && !Rect.IsEmpty()) {
977 if (!DrawPort.IsEmpty())
1037 else if (
Layer >= 0) {
1151 :
cPixmap(Layer, ViewPort, DrawPort)
1153 data =
MALLOC(
tColor, this->DrawPort().Width() * this->DrawPort().Height());
1165 memset(
data, 0x00, DrawPort().Width() * DrawPort().Height() *
sizeof(
tColor));
1173 for (
int i = DrawPort().Width() * DrawPort().Height() - 1; i >= 0; i--)
1181 if (Pixmap->
Tile() && (Pixmap->DrawPort().Point() !=
cPoint(0, 0) || Pixmap->DrawPort().Size() < Pixmap->ViewPort().Size())) {
1182 cPoint t0 = Pixmap->DrawPort().Point().Shifted(Pixmap->ViewPort().Point());
1184 while (t0.
X() > Pixmap->ViewPort().Left())
1185 t0.
Shift(-Pixmap->DrawPort().Width(), 0);
1186 while (t0.
Y() > Pixmap->ViewPort().Top())
1187 t0.
Shift(0, -Pixmap->DrawPort().Height());
1189 while (t.
Y() <= Pixmap->ViewPort().Bottom()) {
1190 while (t.
X() <= Pixmap->ViewPort().Right()) {
1191 cRect Source = Pixmap->DrawPort();
1192 Source.
Shift(Pixmap->ViewPort().Point());
1197 if (!Source.IsEmpty()) {
1199 Source.
Shift(Delta);
1200 Source.
Shift(-Pixmap->ViewPort().Point());
1201 Source.
Shift(-Pixmap->DrawPort().Point());
1202 if (Pixmap->
Layer() == 0)
1203 Copy(Pixmap, Source, Dest);
1205 Render(Pixmap, Source, Dest);
1207 t.
Shift(Pixmap->DrawPort().Width(), 0);
1210 t.
Shift(0, Pixmap->DrawPort().Height());
1214 cRect Source = Pixmap->DrawPort();
1215 Source.
Shift(Pixmap->ViewPort().Point());
1218 if (!Source.IsEmpty()) {
1220 Source.
Shift(-Pixmap->ViewPort().Point());
1221 Source.
Shift(-Pixmap->DrawPort().Point());
1222 if (Pixmap->
Layer() == 0)
1223 Copy(Pixmap, Source, Dest);
1225 Render(Pixmap, Source, Dest);
1236 int wd = DrawPort().Width();
1240 ps -= Point.
Y() * ws;
1244 for (
int y = r.
Height(); y-- > 0; ) {
1265 if (DrawPort().Size().Contains(Point)) {
1266 int p = Point.
Y() * DrawPort().Width() + Point.
X();
1281 bool UseColors = ColorFg || ColorBg;
1282 int wd = DrawPort().
Width();
1284 for (
int y = r.
Top(); y <= r.
Bottom(); y++) {
1286 for (
int x = r.
Left(); x <= r.
Right(); x++) {
1287 tIndex Index = *Bitmap.
Data(x - Point.
X(), y - Point.
Y());
1288 if (Index || !Overlay) {
1290 *cd = Index ? ColorFg : ColorBg;
1292 *cd = Bitmap.Color(Index);
1311 int cw = Width ? Width : w;
1312 int ch = Height ? Height : h;
1313 cRect r(x, y, cw, ch);
1316 if (Width || Height) {
1319 if ((Alignment &
taLeft) != 0) {
1323 else if ((Alignment &
taRight) != 0) {
1331 x += (Width - w) / 2;
1335 if ((Alignment &
taTop) != 0)
1337 else if ((Alignment &
taBottom) != 0) {
1343 y += (Height - h) / 2;
1347 Font->
DrawText(
this, x, y, s, ColorFg, ColorBg, limit);
1357 int wd = DrawPort().
Width();
1361 for (
int y = r.
Height(); y-- > 0; ) {
1367 for (
int x = r.
Width(); x-- > 0; ) {
1385 int x1 = Rect.
Left();
1386 int y1 = Rect.
Top();
1387 int x2 = Rect.
Right();
1391 int cx = (x1 + x2) / 2;
1392 int cy = (y1 + y2) / 2;
1393 switch (abs(Quadrants)) {
1394 case 0: rx /= 2; ry /= 2;
break;
1395 case 1: cx = x1; cy = y2;
break;
1396 case 2: cx = x2; cy = y2;
break;
1397 case 3: cx = x2; cy = y1;
break;
1398 case 4: cx = x1; cy = y1;
break;
1399 case 5: cx = x1; ry /= 2;
break;
1400 case 6: cy = y2; rx /= 2;
break;
1401 case 7: cx = x2; ry /= 2;
break;
1402 case 8: cy = y1; rx /= 2;
break;
1405 int TwoASquare =
max(1, 2 * rx * rx);
1406 int TwoBSquare =
max(1, 2 * ry * ry);
1409 int XChange = ry * ry * (1 - 2 * rx);
1410 int YChange = rx * rx;
1411 int EllipseError = 0;
1412 int StoppingX = TwoBSquare * rx;
1414 while (StoppingX >= StoppingY) {
1415 switch (Quadrants) {
1423 case 6:
DrawRectangle(
cRect(cx - x, cy - y, 2 * x + 1, 1), Color);
if (Quadrants == 6)
break;
1432 StoppingY += TwoASquare;
1433 EllipseError += YChange;
1434 YChange += TwoASquare;
1435 if (2 * EllipseError + XChange > 0) {
1437 StoppingX -= TwoBSquare;
1438 EllipseError += XChange;
1439 XChange += TwoBSquare;
1445 YChange = rx * rx * (1 - 2 * ry);
1448 StoppingY = TwoASquare * ry;
1449 while (StoppingX <= StoppingY) {
1450 switch (Quadrants) {
1458 case 6:
DrawRectangle(
cRect(cx - x, cy - y, 2 * x + 1, 1), Color);
if (Quadrants == 6)
break;
1467 StoppingX += TwoBSquare;
1468 EllipseError += XChange;
1469 XChange += TwoBSquare;
1470 if (2 * EllipseError + YChange > 0) {
1472 StoppingY -= TwoASquare;
1473 EllipseError += YChange;
1474 YChange += TwoASquare;
1486 bool upper = Type & 0x01;
1487 bool falling = Type & 0x02;
1488 bool vertical = Type & 0x04;
1489 int x1 = Rect.
Left();
1490 int y1 = Rect.
Top();
1491 int x2 = Rect.
Right();
1493 int w = Rect.
Width();
1496 for (
int y = y1; y <= y2; y++) {
1497 double c = cos((y - y1) * M_PI / h);
1500 int x = (x1 + x2) / 2 +
int(w * c / 2);
1501 if (upper && !falling || !upper && falling)
1508 for (
int x = x1; x <= x2; x++) {
1509 double c = cos((x - x1) * M_PI / w);
1512 int y = (y1 + y2) / 2 +
int(h * c / 2);
1534 int a = pm->Alpha();
1535 int ws = pm->DrawPort().
Width();
1536 int wd = DrawPort().Width();
1539 for (
int y = d.
Height(); y-- > 0; ) {
1542 for (
int x = d.
Width(); x-- > 0; ) {
1568 int ws = pm->DrawPort().
Width();
1569 int wd = DrawPort().Width();
1573 for (
int y = d.
Height(); y-- > 0; ) {
1590 s = DrawPort().
Shifted(-DrawPort().Point());
1599 int ws = DrawPort().
Width();
1604 for (
int y = d.
Height(); y-- > 0; ) {
1634 "bpp not supported",
1662 for (
int i = 0; i <
Osds.
Size(); i++) {
1680 for (
int i = 0; i <
Osds.
Size(); i++) {
1681 if (
Osds[i] ==
this) {
1684 Osds[0]->SetActive(
true);
1734 if (Pixmap->
Layer() >= 0)
1735 pixmaps[0]->MarkViewPortDirty(Pixmap->ViewPort());
1741 esyslog(
"ERROR: attempt to destroy an unregistered pixmap");
1767 if (!pm->DirtyViewPort().IsEmpty()) {
1768 if (d.IsEmpty() || d.
Intersects(pm->DirtyViewPort())) {
1769 d.
Combine(pm->DirtyViewPort());
1778 static cRect OldDirty;
1781 OldDirty = NewDirty;
1790 if (pm->Layer() == Layer)
1797 static tColor DirtyIndicatorColors[] = { 0x7FFFFF00, 0x7F00FFFF };
1798 static int DirtyIndicatorIndex = 0;
1799 DirtyIndicator.
Fill(DirtyIndicatorColors[DirtyIndicatorIndex]);
1800 DirtyIndicatorIndex = 1 - DirtyIndicatorIndex;
1801 Pixmap->
Render(&DirtyIndicator, DirtyIndicator.DrawPort(), DirtyIndicator.ViewPort().Point().Shifted(-Pixmap->ViewPort().Point()));
1814 for (
int i = 0; i < NumAreas; i++) {
1815 if (Areas[i].x1 > Areas[i].x2 || Areas[i].y1 > Areas[i].y2 || Areas[i].x1 < 0 || Areas[i].y1 < 0)
1817 for (
int j = i + 1; j < NumAreas; j++) {
1818 if (Areas[i].Intersects(Areas[j])) {
1823 if (Areas[i].bpp == 32) {
1834 if (Result ==
oeOk) {
1854 for (
int i = 0; i < NumAreas; i++) {
1870 cRect r(x1, y1, x2 - x1 + 1, y2 - y1 + 1);
1914 pixmaps[0]->DrawImage(Point, Image);
1920 pixmaps[0]->DrawImage(Point, ImageHandle);
1936 pixmaps[0]->DrawBitmap(
cPoint(x, y), Bitmap, ColorFg, ColorBg, Overlay);
1939 bitmaps[i]->
DrawBitmap(x, y, Bitmap, ColorFg, ColorBg, ReplacePalette, Overlay);
1947 b = b->
Scaled(FactorX, FactorY, AntiAlias);
1966 pixmaps[0]->DrawRectangle(
cRect(x1, y1, x2 - x1 + 1, y2 - y1 + 1), Color);
1976 pixmaps[0]->DrawEllipse(
cRect(x1, y1, x2 - x1 + 1, y2 - y1 + 1), Color, Quadrants);
1986 pixmaps[0]->DrawSlope(
cRect(x1, y1, x2 - x1 + 1, y2 - y1 + 1), Color, Type);
2021 esyslog(
"ERROR: attempt to open OSD while it is already open - using dummy OSD!");
2027 ActiveOsd->SetActive(
false);
2028 Osd->SetActive(
true);
2033 esyslog(
"ERROR: no OSD provider available - using dummy OSD!");
2034 return new cOsd(Left, Top, 999);
2043 cDevice::PrimaryDevice()->GetOsdSize(Width, Height, Aspect);
2059 dsyslog(
"OSD size changed to %dx%d @ %g", Width, Height, Aspect);
2078 esyslog(
"ERROR: no OSD provider available in call to SupportsTrueColor()");
2098 delete images[ImageHandle];
2099 images[ImageHandle] = NULL;
2107 return images[ImageHandle];
2173 for (
int i = 0; i <
shown; i++)