I want to create a compass that should rotate. Does anyone know how to make a Timage or TBitmap to rotate? Is thera another way of rotating an image on a From?
: Hi. : : I want to create a compass that should rotate. Does : anyone know how to make a Timage or TBitmap to rotate? : Is there another way of rotating an image on a From? : : //me
To the best of my knowledge (and I am already searching for some years) it is not possible to rotate an image (except for 90,180 and 270 degrees). I have been working on a function that enables me to do this, but I only have it 90% finished.
But simple objects can be rotated by drawing them manually, like the needle of a compass:
- 1. I have seen components for c++ builder that allow you to rotate images. - 2. Do not try to rotate your Image. Draw it on real time. - 3. You can overlay a lot of images (all rotated on different angles) and hide or show them din
: You have three options: : : - 1. I have seen components for c++ builder that allow you to rotate : images. : - 2. Do not try to rotate your Image. Draw it on real time. : - 3. You can overlay a lot of images (all rotated on different : angles) and hide or show them din
Comments
:
: I want to create a compass that should rotate. Does
: anyone know how to make a Timage or TBitmap to rotate?
: Is there another way of rotating an image on a From?
:
: //me
To the best of my knowledge (and I am already searching for some years) it is not possible to rotate an image (except for 90,180 and 270 degrees). I have been working on a function that enables me to do this, but I only have it 90% finished.
But simple objects can be rotated by drawing them manually, like the needle of a compass:
[code]
const double midX = /* something */;
const double midY = /* something */;
const double needleRay = /* something */
double needleAngle = /* something */;
const double needleX = midX - (std::cos(needleAngle) * needleRay);
const double needleY = midY + (std::cos(needleAngle) * needleRay);
//Draw the lines
[/code]
(needleAngle is in radians and goes from 0.0 to 2.0*M_PI as a clock goes from 0:00 to 12:00)
But I hope someone else can show an algorithm
See ya,
See ya,
bilderbikkel
- 1. I have seen components for c++ builder that allow you to rotate images.
- 2. Do not try to rotate your Image. Draw it on real time.
- 3. You can overlay a lot of images (all rotated on different angles) and hide or show them din
:
: - 1. I have seen components for c++ builder that allow you to rotate
: images.
: - 2. Do not try to rotate your Image. Draw it on real time.
: - 3. You can overlay a lot of images (all rotated on different
: angles) and hide or show them din