(Gast)
n/a Beiträge
|
Re: TextOut Font zuweisung
30. Mai 2008, 14:53
Habe es jetzt mal nach TCanvas umgestellt..
Selbe problem hmmmm....
Im Render Event
Delphi-Quellcode:
if SoInfo.Title <> '' then
BassSoVis1.DrawSongName(VisCanvas);
if (not BitBlt(canvas, VisInfo^.x, VisInfo^.y, VisInfo^.w, VisInfo^.h, VisInfo^.VisDC, 0,
0, SRCCOPY)) then
begin
VisInfo^.Rendering := False;
BassFuncs^.SetError(BASS_ERROR_DEVICE);
Exit;
end;
Delphi-Quellcode:
procedure OutlinedDrawText(Canvas: TCanvas;
r: TRect;
const Text: string;
OutlineColor: TColor);
var
OldBrushStyle: TBrushStyle;
OldFontColor : TColor;
begin
with Canvas do
begin
Lock;
OldFontColor := Font.Color;
Font.Color := OutlineColor;
OldBrushStyle := Brush.Style;
Brush.Style := bsClear;
Font.Color := OldFontColor;
DrawText(Canvas.Handle, PChar(Text),
Length(SoInfo.Title), r, DT_BOTTOM or DT_END_ELLIPSIS);
Brush.Style := OldBrushStyle;
Unlock;
end;
end;
procedure TBASSSoniqueVis.DrawSongName(Canvas : TCanvas);
var
Text: String;
r : TRect;
begin
with Canvas do
begin
Lock;
Text := SoInfo.Title;
Font.Size := 10;
Font.Name := 'Arial';
canvas.Brush.Style := bsClear;
Font.Color := clWhite;
r := Rect(5, VisInfo^.h -15, VisInfo^.w-100, VisInfo^.h);
OutlinedDrawText(Canvas, r, Text, clBlack);
Unlock;
end;
end;
Was machen ??
Geht auch hier nichts ohne auf OpenGl umzusteigen ?
gruss Emil
|
|
Zitat
|