Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Otros entornos y lenguajes > C++ Builder
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #11  
Antiguo 28-10-2016
Avatar de ecfisa
ecfisa ecfisa is offline
Moderador
 
Registrado: dic 2005
Ubicación: Tres Arroyos, Argentina
Posts: 10.508
Poder: 38
ecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to behold
Hola Snaked.

A ver... fijate si esta idea te puede servir aunque sea como puntapié inicial.
Código PHP:
//...
const int MAX_X 1366;

class 
Ship {
private:
  
TPoint _route[MAX_X];
  
TPoint _start;
  
TPoint _stop;
  
int _toproute;
  
int calcRoute();
  const 
TPoint &getPt(const int &ix) { return _route[ix]; }
public:
  
Ship( const TPointstart, const TPointstop);
  
__property int topRoute = { read _toproute };
  
__property TPoint route[int] = { read getPt };
};

Ship::Ship( const TPointstart, const TPointstop) {
  
_start start;
  
_stop  stop;
  
_toproute  calcRoute();
}

int Ship::calcRoute()
{
  
int dx _stop._start.x;
  
int dy _stop._start.y;
  
int cx;

  for(
c=0_start.x_stop.xc++, x++ ) {
    
int y _start.dy * ( _start.) / dx;
    
_route[c]._start.x;
    
_route[c].y;
  }
  return 
c;
}

Ship ship1 Ship(Point(  10100 ), Point240200 ));
Ship ship2 Ship(Point(  50,  50 ), Point150300 ));
Ship ship3 Ship(Point(  8090 ), Point(  220100 ));
int c1c2c3;

void __fastcall TForm1::FormCreate(TObject *Sender)
{
  
Image1->Visible  false;
  
Image2->Visible  false;
  
Image3->Visible  false;
  
Timer1->Interval 15;
  
Timer2->Interval 15;
  
Timer3->Interval 15;
  
Timer1->Enabled  false;
  
Timer2->Enabled  false;
  
Timer3->Enabled  false;
}

void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
  
Image1->Visible c1 ship1.topRoute;
  
Timer1->Enabled Image1->Visible;
  if (
Image1->Visible) {
    
Image1->Left ship1.route[c1].x;
    
Image1->Top  ship1.route[c1].y;
  }
  ++
c1;
}

void __fastcall TForm1::Timer2Timer(TObject *Sender)
{
  
Image2->Visible c2 ship2.topRoute;
  
Timer2->Enabled Image2->Visible;
  if (
Image2->Visible) {
    
Image2->Left ship2.route[c2].x;
    
Image2->Top  ship2.route[c2].y;
  }
  ++
c2;
}

void __fastcall TForm1::Timer3Timer(TObject *Sender)
{
  
Image3->Visible c3 ship3.topRoute;
  
Timer3->Enabled Image3->Visible;
  if (
Image3->Visible) {
    
Image3->Left ship3.route[c3].x;
    
Image3->Top  ship3.route[c3].y;
  }
  ++
c3;
}

void __fastcall TForm1::btnStartClick(TObject *Sender)
{
  
c1 c2 c3 0;
  
Timer1->Enabled true;
  
Timer2->Enabled true;
  
Timer3->Enabled true;
}

//... 
Efecto:



Saludos
__________________
Daniel Didriksen

Guía de estilo - Uso de las etiquetas - La otra guía de estilo ....
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
Copiar TLabel.Canvas sobre TBitmap.Canvas @CSE1970 Gráficos 2 23-10-2013 12:46:53
Impresion linea por linea en tiquete de caja Livey Impresión 2 21-12-2010 00:21:05
uso de DLL creada con VB6 lichi OOP 0 12-09-2005 16:55:46
Como imprimir por canvas un caracter de salto de linea buitrago Impresión 3 30-08-2004 11:10:05
¿Cómo borrar un grid sin tener que ir línea a línea? Isaac Varios 2 18-02-2004 16:13:14


La franja horaria es GMT +2. Ahora son las 05:07:48.


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