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
linux x64 assembler
by
mika
[
Today
at 09:05:23 pm]
fphttpclient
by
berghem
[
Today
at 08:54:41 pm]
Get palette
by
justnewbie
[
Today
at 08:23:30 pm]
Linux messagebox
by
MarkMLl
[
Today
at 08:12:43 pm]
Indy: check if client is ...
by
Remy Lebeau
[
Today
at 08:11:22 pm]
Problem with receiving ev...
by
Igor Kokarev
[
Today
at 07:43:29 pm]
[Index] My Collections of...
by
ASBzone
[
Today
at 07:29:49 pm]
FPC on Rasp Pi, non Lazar...
by
MarkMLl
[
Today
at 07:28:07 pm]
Tchart Log10 transformati...
by
flori
[
Today
at 07:00:12 pm]
More componenets.
by
Martin_fr
[
Today
at 06:36:43 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Zoom in, zoom out and rotate images (Read 4014 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: 4063
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