Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
form canvas array?
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
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
Learn how to (un)dock a T...
by
Hansvb
[
Today
at 08:44:26 pm]
string argument as array ...
by
jamie
[
Today
at 08:26:49 pm]
Little Red Riding Hood (t...
by
Lulu
[
Today
at 08:04:22 pm]
compilerproc Problem by u...
by
paule32
[
Today
at 07:53:37 pm]
New version of BGRABitmap
by
circular
[
Today
at 07:53:02 pm]
DeleteDirectory doesn't a...
by
Bart
[
Today
at 07:43:20 pm]
LAMW arduino serial comm ...
by
jmpessoa
[
Today
at 07:38:54 pm]
problem with scrollbox
by
rcmz
[
Today
at 06:37:56 pm]
SynEdit
by
Martin_fr
[
Today
at 06:27:48 pm]
MacOS intel : Lazarus-dar...
by
Selzig
[
Today
at 05:58:28 pm]
I can write your README.m...
by
wp
[
Today
at 05:31:52 pm]
Daraja HTTP Framework 3.0...
by
mjustin
[
Today
at 05:16:20 pm]
AnchorDocking in my app
by
Fred vS
[
Today
at 04:50:30 pm]
my programs crash
by
turunk
[
Today
at 02:54:49 pm]
Looking for industrial pa...
by
krolikbest
[
Today
at 01:45:55 pm]
WM_ message List for dest...
by
paule32
[
Today
at 01:43:04 pm]
FPC 3.3.1 release date an...
by
Martin_fr
[
Today
at 01:08:18 pm]
I lost in Code ...
by
cdbc
[
Today
at 01:00:56 pm]
Feature request/suggestio...
by
440bx
[
Today
at 12:35:16 pm]
[solved] how to post a po...
by
Nicole
[
Today
at 12:12:45 pm]
Somebody interested by RT...
by
Dzandaa
[
Today
at 11:35:10 am]
Feature request/suggestio...
by
440bx
[
Today
at 10:50:23 am]
Serial port
by
MarkMLl
[
Today
at 09:21:57 am]
Ring Type Animation (cann...
by
Boleeman
[
Today
at 07:45:50 am]
Animated Amulet: Tentacle...
by
Boleeman
[
Today
at 07:41:05 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: form canvas array? (Read 6459 times)
jw
Full Member
Posts: 126
form canvas array?
«
on:
April 14, 2010, 09:42:41 pm »
Is there a way to create an array of the forms canvas?
like so
form1.canvas[1].draw(etc......
form1.canvas[2].draw(etc...
form1.canvas
draw.........
this way each canvas could be updated independently of each other?
Logged
eny
Hero Member
Posts: 1646
Re: form canvas array?
«
Reply #1 on:
April 14, 2010, 09:58:46 pm »
Code:
[Select]
TForm1 = class(TForm)
private
CanvasArray: array[0..<choose size>] of TCanvas; // ?
end;
Logged
All posts based on: Win10 (Win64); Lazarus 3_4 (x64) 25-05-2024 (unless specified otherwise...)
Marc
Administrator
Hero Member
Posts: 2645
Re: form canvas array?
«
Reply #2 on:
April 14, 2010, 11:37:09 pm »
A from has only one canvas. if you want multiple canvases, use a paintbox and several TBitmaps, paint on the bitmap.canvas whenever you want, draw the bitmaps in the paintbox.onpait event.
Logged
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the
bug tracker
jw
Full Member
Posts: 126
Re: form canvas array?
«
Reply #3 on:
April 15, 2010, 05:51:29 pm »
marc
I think the problem ends up being what you said in one of my other posts.
The LCL doesn't draw an alpha image on an exiting background, so the image replaces.
so is this how it works?
If I have 3 paintboxes I update paintbox 3 by animating the sprite.
this clears the form.canvas and redraws all paintbox canvases to the form.canvas in the zorder.
the reason I ask is because I've been trying to cordinate all sprites by drawing them to the form.canvas directly to make more effecient code. I've found that no matter what any change to a paintbox leads to canvas form redraw which is why I asked the dc windowless question in the graphics forum.
I thought I could make an array of canvases for the form that could be altered independently then do an alpha blend by useing my post how do I make a transparent background. I've already done something similar useing multiple form as I said in the dc windowless post but it has it's drawbacks.
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
form canvas array?
TinyPortal
© 2005-2018