DrawText() mit Schatten?

  • Bin gerade am versuchen Text mittels DrawText() einen Schatten zu verpassen. Leider sind meine Versuche bislang ohne Erfolg geblieben.

    Ich habe erst versucht den Schatten zuerst zu Zeichnen und darüber den Text. Leider kein Schatten. Auch eine extra Pixmap für den Schatten bringt keinen Erfolg. Wo liegt mein Denkfehler? Kann man Text überhaupt überlappend anzeigen lassen? Hier mal ein Codeauszug:

    Code
        PixmapFill(ChanInfoTopBgPixmap, clrTransparent);
        PixmapFill(ChanInfoTopPixmap, clrTransparent);
        // Draw shadow
        const int ShadowSize = std::max(m_FontBigHeight / 10, 3);  // Shadow should have at least 3 pixel
        ChanInfoTopBgPixmap->DrawText(cPoint(left + ShadowSize, ShadowSize), *ChannelString, Theme.Color(clrGray50),
                                    clrTransparent, m_FontBig);
        ChanInfoTopPixmap->DrawText(cPoint(left, 0), *ChannelString, Theme.Color(clrChannelFontTitle),
                                    clrTransparent, m_FontBig);

    Kanallogos: Picon.cz2VDR | Picons2VDR | MP-Logos
    Backupskripte:
    MV_Backup (RSync) | MV_BorgBackup (Borg)

    Skin: Skin FlatPlus  VDR-Add_MSGT

    "Es gibt keinen Grund, warum irgendjemand einen Computer in seinem Haus wollen würde."
    [Ken Olson], Präsident der Digital Equipment Corp., 1977

    VDR01 - yaVDR 0.7 (VDR 2.7.3)

    VDR 2.7.3; Gehäuse: Antec Fusion V2 Black & iMon LCD; Atric IR-Einschalter Rev. 4; Board: Intel DH77EB, Core i5-3550, GTX 1050 Ti, 8 GB RAM; DVB: 1x Digital Devices CineS2 Quad V6.5

    >Systeminfo.txt< [VDR-User #1540]

  • Vielleicht hilft die das aus meinem pictures Plugin:

    Code
    static void DrawTextOutlined(cOsd *Osd, int x, int y, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font)
    {
      for (int dx = -1; dx <= 1; dx++) {
          for (int dy = -1; dy <= 1; dy++) {
              if (dx || dy)
                 Osd->DrawText(x + dx, y + dy, s, ColorBg, clrTransparent, Font);
              }
          }
      Osd->DrawText(x, y, s, ColorFg, clrTransparent, Font);
    }
  • Vielen Dank. Probier das mal aus

    Kanallogos: Picon.cz2VDR | Picons2VDR | MP-Logos
    Backupskripte:
    MV_Backup (RSync) | MV_BorgBackup (Borg)

    Skin: Skin FlatPlus  VDR-Add_MSGT

    "Es gibt keinen Grund, warum irgendjemand einen Computer in seinem Haus wollen würde."
    [Ken Olson], Präsident der Digital Equipment Corp., 1977

    VDR01 - yaVDR 0.7 (VDR 2.7.3)

    VDR 2.7.3; Gehäuse: Antec Fusion V2 Black & iMon LCD; Atric IR-Einschalter Rev. 4; Board: Intel DH77EB, Core i5-3550, GTX 1050 Ti, 8 GB RAM; DVB: 1x Digital Devices CineS2 Quad V6.5

    >Systeminfo.txt< [VDR-User #1540]

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!