Club Delphi  
    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
  #2  
Antiguo 27-02-2004
dridly dridly is offline
Registrado
 
Registrado: feb 2004
Posts: 5
Poder: 0
dridly Va por buen camino
Question PolyPolyLine

Hola! Tengo un problema. Intento hacer un programa que dibuje lineas (parece sencillo). Con el botón izquierdo va dibujando las líneas, y con el derecho deja de dibujar el trazado actual.
Lo voy almacenando todo en una array de Tpoints. Para dibujar utilizo el PolyPolyLine, pero cada vez que quiero que me dibuje no me hace nada.
El código es el siguiente:

procedure TFrmDibujo.ImageMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if ssLeft in Shift then//si pulsas el botón izquierdo
begin
SetLength(Element, i+1);//redimensiona la array de coordenadas
if Element[0].x=0 then
begin
Element[0].x:=X;Element[0].y:=Y;
end else
begin
Element[i].x:=X;Element[i].y:=Y;
end;
Inc(i);
end
else //SI PULSAS EL BOTÓN DERECHO
begin
SetLength(NumElements, j+1);
NumElements[j]:=i;
Inc(j);
PolyPolyline(Image.Canvas.Handle, Element, NumElements, j);
end;
end;


Cuando pulsas el botón derecho le digo que dibuje, pero no lo hace. Alguien me puede decir a que es debido???
Gracias!
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


La franja horaria es GMT +2. Ahora son las 20:10:43.


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