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
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
We are starting to use La...
by
dbannon
[
Today
at 01:50:02 am]
[ANN] fpGUI Toolkit v2.0....
by
Graeme
[
Today
at 01:43:31 am]
Frustrating Error When us...
by
TYDQ
[
Today
at 01:38:26 am]
Fast Canvas Library V1.05...
by
backprop
[
Today
at 01:32:51 am]
fpGUI Toolkit v2.0.1 has ...
by
Graeme
[
Today
at 01:14:03 am]
; after then
by
Martin_fr
[
Today
at 12:38:46 am]
Are the source files for ...
by
Martin_fr
[
Today
at 12:26:57 am]
Debian removes FPC/Lazaru...
by
kupferstecher
[February 13, 2026, 10:29:53 pm]
AVRPascal – free code edi...
by
ackarwow
[February 13, 2026, 10:08:59 pm]
Select rectangle of the i...
by
backprop
[February 13, 2026, 08:16:27 pm]
How to determine the unkn...
by
LV
[February 13, 2026, 07:37:32 pm]
how to enable multihelper...
by
mas steindorff
[February 13, 2026, 07:03:20 pm]
Lazarus/FreePascal Bug
by
Bart
[February 13, 2026, 06:27:28 pm]
Questions from a Windows ...
by
CM630
[February 13, 2026, 06:15:33 pm]
Duplicated icon in the Wi...
by
w click
[February 13, 2026, 05:47:49 pm]
The Future of FPC
by
440bx
[February 13, 2026, 04:29:34 pm]
ThorVG - test (lightweigh...
by
LeP
[February 13, 2026, 03:07:25 pm]
AdvancedHTTPServer: A Go-...
by
LeP
[February 13, 2026, 03:01:15 pm]
Status of FPC 3.4.0 or FP...
by
gidesa
[February 13, 2026, 12:35:41 pm]
Notetask 1.1.1 - Free cro...
by
AlexanderT
[February 13, 2026, 12:00:08 pm]
Bee Hive solitaire
by
TBMan
[February 13, 2026, 03:22:09 am]
AI Created Music
by
Tony Stone
[February 13, 2026, 03:02:08 am]
Send form to true left an...
by
mas steindorff
[February 13, 2026, 02:39:34 am]
Help needed compiling
by
jamie
[February 13, 2026, 02:33:02 am]
Free Pascal for a small e...
by
dbannon
[February 13, 2026, 02:24:49 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: form canvas array? (Read 6609 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: 1653
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: 2673
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