Thema: Delphi TextSuite will nicht

Einzelnen Beitrag anzeigen

EWeiss
(Gast)

n/a Beiträge
 
#9

Re: TextSuite will nicht

  Alt 1. Jul 2008, 14:23
Danke für den Tip mit den Border..
Zitat:
Ich persönlich würde da wohl die sauberere Schrift vorziehen. Aber diese Entscheidung liegt bei dir.
Auf jedenfall eine saubere Schrift.

das Sample sieht jetzt schon mal besser aus.
Delphi-Quellcode:
procedure glPrintXY(x, y : GLFloat;
                    fWidth,
                    fHeight : GLFloat;
                    text : pchar;
                    fontset : tsFontID; Textalign: Integer);

begin

  tsTextColor3f(1, 1, 1);
  tsFontBind(fontset);
  tsSetParameteri(TS_ALIGN, Textalign);

  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  glOrtho(0,fWidth,0,fHeight,-100,100);
  glMatrixMode(GL_MODELVIEW);
  glLoadIdentity();

  glPushMatrix();
    glTranslated(x, y, 0);
    glScalef(1, -1, 1);
    tsTextOutA(text);
  glPopMatrix();

end;


procedure TMainForm.FormPaint(Sender: TObject);
begin

  glClear(GL_COLOR_BUFFER_BIT);

  glMatrixMode(GL_PROJECTION);
  glLoadIdentity;
  gluPerspective(45, ClientWidth / ClientHeight, 1, 1000.0);
  glMatrixMode(GL_MODELVIEW);
  glLoadIdentity;

  glPrintXY(15,
            13,
            Width,
            Height,
            'TextSuite Sample - Single Line',
            fLargeFontID,
            TS_ALIGN_LEFT);

  // Check for Errors
  CheckError;

  SwapBuffers(fDC);
end;
Kommt natürlich auch auf den Font an den man benutzt
Habe zum testen mal cyberbit.ttf genommen .. geht aber nicht als standard 12MB für einen Font ist schon arg

Sample Ok kann ich gut mit leben
Vis unidentifizierbare Blöcke von irgendwas
Da ist arg was daneben.
EDIT:
openGL error 1282

Bilder im Anhang

gruss Emil
Miniaturansicht angehängter Grafiken
vis_116.jpg   sample_185.jpg  
  Mit Zitat antworten Zitat