Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-03

Using BGRABitmap as TAChart back-end

8 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Alexander Klenin

Since there seems to be no support for alpha-channel in LCL, I plan to implement series transparency by using BGRABitmap compoment.

To avoid requiring non-core package to install TAChart, it will be added without explicit dependency, similar to the way AggPas and OpenGL backends are implemented now.

However, this is clearly not the optimal solution, so does anybody have better ideas?

Alexander S. Klenin

Reply by email

Marc Weustink
to Alexander Klenin
Alexander Klenin wrote 10 lines
Since there seems to be no support for alpha-channel in LCL, I plan to implement series transparency by using BGRABitmap compoment. To avoid requiring non-core package to install TAChart, it will be added without explicit dependency, similar to the way AggPas and OpenGL backends are implemented now. However, this is clearly not the optimal solution, so does anybody have better ideas?

Its not optimal now, but the LCL will support alpha one day

Marc

Reply by email

Alexander Klenin
to Marc Weustink
Marc Weustink wrote 5 lines
Alexander Klenin wrote: > > Since there seems to be no support for alpha-channel in LCL, > I plan to implement series transparency by using BGRABitmap compoment. Its not optimal now, but the LCL will support alpha one day

But this day is far away, I gather?
Perhaps BGRABitmap may be (partially) intergated into the LCL?

Anyway, the question was also about managing package dependencies -- TAChart already have, besides default TCanvas back-end, AggPas, OpenGL and Printer back-ends, and SVG is planned. Since these back-ends are useful to only a small part of users, I do not want TAChart to depend on all these packages by default.

Alexander S. Klenin

Reply by email

Mattias Gaertner
to Alexander Klenin

?
?

Alexander Klenin hat am 16. M?rz 2011 um 10:45 geschrieben:

Show quoted text 15 lines
On Wed, Mar 16, 2011 at 19:35, Marc Weustink wrote: > Alexander Klenin wrote: >> >> Since there seems to be no support for alpha-channel in LCL, >> I plan to implement series transparency by using BGRABitmap compoment. > Its not optimal now, but the LCL will support alpha one day But this day is far away, I gather? Perhaps BGRABitmap may be (partially) intergated into the LCL? Anyway, the question was also about managing package dependencies -- TAChart already have, besides default TCanvas back-end, AggPas, OpenGL and Printer back-ends, and SVG is planned. Since these back-ends are useful to only a small part of users, I do not want TAChart to depend on all these packages by default.

One solution:
Write a package TAChartAggPas, that depends on AggPasLcl and tachartlazaruspkg and has a unit implementing the aggpas backend for TAChart.

Mattias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110316/87a2ba59/attachment-0001.html>

Reply by email

Alexander Klenin
to Mattias Gaertner

2011/3/16 Mattias Gaertner :

Show quoted text 9 lines
> Anyway, the question was also about managing package dependencies -- > TAChart already have, besides default TCanvas back-end, > AggPas, OpenGL and Printer back-ends, and SVG is planned. > Since these back-ends are useful to only a small part of users, > I do not want TAChart to depend on all these packages by default. One solution: Write a package TAChartAggPas, that depends on AggPasLcl and tachartlazaruspkg and has a unit implementing the aggpas backend for TAChart.

I considered that. But it will be one package per dependency -- so +3 packages right now.
Is it ok from user interface point of view? Is there a notion of "package group" in the IDE?
If not, maybe it is a good idea to create one?

Alexander S. Klenin

Reply by email

Mattias Gaertner
to Alexander Klenin

?
?

Alexander Klenin hat am 16. M?rz 2011 um 11:23 geschrieben:

Show quoted text 14 lines
2011/3/16 Mattias Gaertner : >> Anyway, the question was also about managing package dependencies -- >> TAChart already have, besides default TCanvas back-end, >> AggPas, OpenGL and Printer back-ends, and SVG is planned. >> Since these back-ends are useful to only a small part of users, >> I do not want TAChart to depend on all these packages by default. > One solution: > Write a package TAChartAggPas, that depends on AggPasLcl and > tachartlazaruspkg and has a unit implementing the aggpas backend for > TAChart. I considered that. But it will be one package per dependency -- so +3 packages right now. Is it ok from user interface point of view??

I think yes. The project requires only one dependency instead of two (TAChart+AggPas). So this might actually be an advantage. ?
The other possibility is to use conditionals and let the project enable it via switches. But this is less safe, aka more things can go wrong. For example the programmer might setup the dependencies in the wrong order and will get unit-not-found errors, which will not be helpful.

?

Is there a notion of "package group" in the IDE? If not, maybe it is a good idea to create one??

What should that be?
Packages are shown alphabetically, so if you use the same prefix they are listed close together.
?
?
Mattias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110316/192b34be/attachment.html>

Reply by email

Alexander Klenin
to Mattias Gaertner

2011/3/16 Mattias Gaertner :

Show quoted text 10 lines
> > Write a package TAChartAggPas, that depends on AggPasLcl and > > tachartlazaruspkg and has a unit implementing the aggpas backend for > > TAChart. > I considered that. But it will be one package per dependency -- so +3 > packages right now. > Is it ok from user interface point of view? I think yes. The project requires only one dependency instead of two (TAChart+AggPas). So this might actually be an advantage.

I was rather wondering about how easy it would be for the user to discover the need for that one dependency.

Show quoted text 6 lines
> Is there a notion of "package group" in the IDE? > If not, maybe it is a good idea to create one? What should that be? Packages are shown alphabetically, so if you use the same prefix they are listed close together.

I was thinking about the following:

1) Let "sub-package" be a special kind of package with the additional "Parent" field
2) In the IDE package list, display only a parent packages (maybe display sub-packages
in a treeview-like manner)
3) Automatically install sub-packages if all their dependencies are installed (that, naturally, includes parent packages).

The end result would be, if the user installs TAChart and OpenGL, he will automatically have opengl back-end, without the need to worry about TAChartOpenGL package.

But may be it is overkill. To this moment, I am aware of a single user interested in AggPas back-end.

Alexander S. Klenin

Reply by email

Mattias Gaertner
to Alexander Klenin

?
?

Alexander Klenin hat am 16. M?rz 2011 um 12:14 geschrieben:

Show quoted text 14 lines
2011/3/16 Mattias Gaertner : >> > Write a package TAChartAggPas, that depends on AggPasLcl and >> > tachartlazaruspkg and has a unit implementing the aggpas backend for >> > TAChart. >> I considered that. But it will be one package per dependency -- so +3 >> packages right now. >> Is it ok from user interface point of view? > > I think yes. The project requires only one dependency instead of two > (TAChart+AggPas). So this might actually be an advantage. > I was rather wondering about how easy it would be for the user to discover the need for that one dependency.?

Like any other option. Just add hints/comments to the right places. ?
?

Show quoted text 17 lines
>> Is there a notion of "package group" in the IDE? >> If not, maybe it is a good idea to create one? > What should that be? > > Packages are shown alphabetically, so if you use the same prefix they are > listed close together. I was thinking about the following: 1) Let "sub-package" be a special kind of package with the additional "Parent" field 2) In the IDE package list, display only a parent packages (maybe display sub-packages in a treeview-like manner) 3) Automatically install sub-packages if all their dependencies are installed (that, naturally, includes parent packages).?

The 'install' is only for the IDE and independent of the project. Think about the IDE as another project.
That means 'soft' dependencies can be satisfied by the IDE and/or the project. Which means the package might have different search paths for the IDE and for the project, which might increase confusion.
And you need more IDE knowledge to understand the package.

?

Show quoted text 7 lines
The end result would be, if the user installs TAChart and OpenGL, he will automatically have opengl back-end, without the need to worry about TAChartOpenGL package. But may be it is overkill. To this moment, I am aware of a single user interested in AggPas back-end.

Yes. To summarize:
- There exists another solution, which is not that bad.
- The proposed solution has some drawbacks.
- So far only one request, which makes maintaining/testing difficult.

My conclusion: a good day work better spent elsewhere.

Mattias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110316/608bca7a/attachment.html>

Reply by email