Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Gráficos
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #8  
Antiguo 07-04-2009
c4_esp_VR c4_esp_VR is offline
Registrado
 
Registrado: ago 2007
Posts: 5
Poder: 0
c4_esp_VR Va por buen camino
Hola compañeros:

Estoy intentando crear dinámicamente un texto con GLScene pero este no se me visualiza por pantalla. El código es el sigiuente:

Código:
//Creamos una clase que contiene los siguientes atributos
IDGraph : TGLHUDText; //Texto
GraphStoredBitmapFont: TGLStoredBitmapFont;//Biblioteca para el tratamiento de texto

//En el constructor ponemos

//Creamos el editor de texto
  self.GraphStoredBitmapFont:=TGLStoredBitmapFont.Create(self);
  self.GraphStoredBitmapFont.Font.Charset:=ANSI_CHARSET;
  self.GraphStoredBitmapFont.Font.Color:=clWhite;
  self.GraphStoredBitmapFont.Font.Height:=-11;
  self.GraphStoredBitmapFont.Font.Name:='Verdana';
  self.GraphStoredBitmapFont.Font.Size:=8;
  self.GraphStoredBitmapFont.Font.Style:=[fsBold,fsItalic];
  self.GraphStoredBitmapFont.Ranges[0].StartASCII:=#32;
  self.GraphStoredBitmapFont.Ranges[0].StartGlyphIdx:=0;
  self.GraphStoredBitmapFont.Ranges[0].StopASCII:='}';

//Creamos el texto
  self.IDGraph := TGLHUDText.Create(self.scene.Objects.AddNewChild(TGLHUDText));
  self.IDGraph.Text:='Graph';
  self.IDGraph.Position.SetPoint(0,0,0);
  self.IDGraph.Visible:=True;
  self.IDGraph.BitmapFont := self.GraphStoredBitmapFont;
  self.IDGraph.Alignment := taLeftJustify;
  self.IDGraph.Layout := tlTop;
  self.IDGraph.ModulateColor.AsWinColor:=clWhite;
  self.IDGraph.Scale.SetVector(1,1,1);
  self.IDGraph.Up.SetVector(0,1,0);
Si creo el texto estáticamente desde el editor del GLScene funciona perfectamente pero dinámicamente no me deja.

Soy capaz de crear dinámicamente una tetera, planos, lineas, etc...pero el texto soy incapaz y no sé porqué, cualquier ayuda sería de agradecer.

Sin más muchas gracias.

Última edición por c4_esp_VR fecha: 07-04-2009 a las 12:16:13.
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Centralizar Textos Paulao Impresión 0 02-04-2008 19:30:54
GLScene? PiornoCKA&G Gráficos 2 25-01-2007 10:09:37
GlScene Rabata Gráficos 2 12-06-2006 16:16:32
GlScene??? Rabata Gráficos 1 08-01-2005 21:46:46
Procesador de textos mahiques Varios 4 06-05-2003 10:16:48


La franja horaria es GMT +2. Ahora son las 23:28:02.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi