Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Graphics and Multimedia
»
Graphics
(Moderator:
Ask
) »
Zoom in, zoom out and rotate images
Free Pascal
Website
Downloads
Wiki
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Bugtracker
IRC channel
Latest SVN
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
converting C++ over laz, ...
by
jamie
[
Today
at 01:13:48 am]
Pictures in Forms
by
winni
[
Today
at 12:24:04 am]
[SOLVED] Indicator arrow ...
by
pcurtis
[February 27, 2021, 11:54:02 pm]
MOVED: TChart start posit...
by
trev
[February 27, 2021, 11:05:08 pm]
File handling, records [p...
by
Kays
[February 27, 2021, 11:02:24 pm]
Icon Application
by
Fred vS
[February 27, 2021, 08:53:45 pm]
FPC on Rasp Pi, non Lazar...
by
AlanTheBeast
[February 27, 2021, 08:34:13 pm]
problem executting tproce...
by
Martin_fr
[February 27, 2021, 08:14:04 pm]
Fpcupdeluxe
by
DonAlfredo
[February 27, 2021, 08:11:02 pm]
linux x64 assembler
by
Kays
[February 27, 2021, 08:03:39 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Zoom in, zoom out and rotate images (Read 4008 times)
rc.1990
Jr. Member
Posts: 54
Zoom in, zoom out and rotate images
«
on:
September 27, 2016, 06:10:39 pm »
I am using Lazarus 1.6.0 and FPC 3.0.0.
How can I zoom in, zoom out and rotate images using a TImage component?
Logged
Handoko
Hero Member
Posts: 4048
My goal: build my own game engine using Lazarus
Re: Zoom in, zoom out and rotate images
«
Reply #1 on:
September 27, 2016, 07:20:29 pm »
I think you should not use TImage, it's only the very basic image component to show image on the form. Also it is very slow and can cause flicker if you update the content frequently.
More info on TImage:
http://lazarus-ccr.sourceforge.net/docs/lcl/extctrls/timage.html
http://wiki.freepascal.org/Developing_with_Graphics#Draw_to_a_TImage
A list of 'better' image manipulation options can be found here:
http://wiki.freepascal.org/Developing_with_Graphics#2D_drawing
I recommend you to use BGRABitmap, which has a lot of features, tutorials and better support from the developer in this forum:
http://wiki.freepascal.org/BGRABitmap_tutorial
http://forum.lazarus.freepascal.org/index.php/board,46.0.html
You may interested to see BGRABitmap tutorial #10, it shows how to rotate texture:
http://wiki.freepascal.org/BGRABitmap_tutorial_10
«
Last Edit: September 27, 2016, 07:23:39 pm by Handoko
»
Logged
circular
Hero Member
Posts: 3666
Re: Zoom in, zoom out and rotate images
«
Reply #2 on:
September 27, 2016, 11:42:23 pm »
Yes, and if you want to rotate an image, you can use a TBGRAVirtualScreen and in the redraw event use PutImageAngle (rotation) or Bitmap.PutImageAffine (any affine transformation, so you can zoom and rotate).
Logged
Conscience is the debugger of the mind
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Graphics and Multimedia
»
Graphics
(Moderator:
Ask
) »
Zoom in, zoom out and rotate images
TinyPortal
© 2005-2018