Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Gráficos (https://www.clubdelphi.com/foros/forumdisplay.php?f=8)
-   -   Rotar Shape (https://www.clubdelphi.com/foros/showthread.php?t=33841)

dicatek 18-07-2006 21:22:38

Rotar Shape
 
Necesitaria poder rotar una imagen mediante una barra de "desplazamiento" y que se me marcaran los grados en un Tedit.

Lo que consistiria es que pudiera rotar una linea recta como si se tratara de las agujas de un reloj, del mismo modo, esta aguja tambien deberia de ser personalizable por el usuario.

Que me recomendais¿

Ñuño Martínez 18-07-2006 23:00:20

A la espera de que álguien diga que hay un componente para ello, diré que puedes hacerlo con matemáticas, más concretamente con la trigonometría (senos y cosenos).

Si no tienes idea de cómo conseguirlo, yo tengo un tutorial (en Inglés) explicándolo que podría facilitar si interesa.

dicatek 18-07-2006 23:12:02

Ah bien si no te es mucha molestia podrias mandarme el link para descargarlo.

Muchas gracias!:p

dicatek 18-07-2006 23:33:37

Ok!

Gracias Ñuño Martinez!

He estado revisando y creo que podré hacerlo con el TCanvas y un Paintbox.
Estoy consultando la ayuda de delphi pero no termino de entenderme, mi pregunta es cómo podria modificar en tiempo de ejecución la largada, ancho, color posición (grados)...de la línea?

Estoy viendo que con esas propiedades podría hacerlo:

Font Specifies the font to use when writing text on the image. Set the properties of the TFont object to specify the font face, color, size, and style of the font.
Brush Determines the color and pattern the canvas uses for filling graphical shapes and backgrounds. Set the properties of the TBrush object to specify the color and pattern or bitmap to use when filling in spaces on the canvas.
Pen Specifies the kind of pen the canvas uses for drawing lines and outlining shapes. Set the properties of the TPen object to specify the color, style, width, and mode of the pen.
PenPos Specifies the current drawing position of the pen.
Pixels Specifies the color of the area of pixels within the current ClipRect.


Pero no sé como pasarlo al programa

Muchas gracias!


La franja horaria es GMT +2. Ahora son las 11:15:34.

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