Sign in Join

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

Mailing lists / lazarus / 2011-03

Move simple types away from Graphics unit

5 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

I am trying to write widgetset-independent version of TAChart (and encourage BGRABitmap author to do the same).

To achieve that, Graphics unit should be removed from the dependencies. However, it contains various enumerations which I would like to continue using. For example: TFontStyle, TFontStyles, TPenEndCap, TPenJoinStyle.

I would like those definitions moved to GraphType or, better yet, to FPCanvas.

Alexander S. Klenin

Reply by email

Michael Van Canneyt
to Alexander Klenin
Alexander Klenin wrote 8 lines
I am trying to write widgetset-independent version of TAChart (and encourage BGRABitmap author to do the same). To achieve that, Graphics unit should be removed from the dependencies. However, it contains various enumerations which I would like to continue using. For example: TFontStyle, TFontStyles, TPenEndCap, TPenJoinStyle. I would like those definitions moved to GraphType or, better yet, to FPCanvas.

If no-one of the Lazarus team objects, I can put them in FPCanvas, and then you can make the current definitions in Lazarus an alias for the FPCanvas types.

Michael.

Reply by email

Paul Ishenin
to Alexander Klenin: I am trying to write widgetset-independent version of TAChart (and encourage BGRABitmap…
Alexander Klenin wrote 5 lines
To achieve that, Graphics unit should be removed from the dependencies. However, it contains various enumerations which I would like to continue using. For example: TFontStyle, TFontStyles, TPenEndCap, TPenJoinStyle. I would like those definitions moved to GraphType or, better yet, to FPCanvas.

Did you think that it will be delphi incompatible?

Best regards,
Paul Ishenin

Reply by email

Alexander Klenin
to Paul Ishenin
Paul Ishenin wrote 11 lines
27.03.2011 18:15, Alexander Klenin wrote: > > To achieve that, Graphics unit should be removed from the dependencies. > However, it contains various enumerations which I would like to continue > using. > For example: TFontStyle, TFontStyles, TPenEndCap, TPenJoinStyle. > > I would like those definitions moved to GraphType or, better yet, to > FPCanvas. Did you think that it will be delphi incompatible?

You can reexport those in a manner similar to TPenStyle etc.

Alexander S. Klenin

Reply by email

Alexander Klenin
to Michael Van Canneyt: If no-one of the Lazarus team objects, I can put them in FPCanvas, and then you can make…
Michael Van Canneyt wrote 18 lines
On Sun, 27 Mar 2011, Alexander Klenin wrote: > I am trying to write widgetset-independent version of TAChart > (and encourage BGRABitmap author to do the same). > > To achieve that, Graphics unit should be removed from the dependencies. > However, it contains various enumerations which I would like to continue > using. > For example: TFontStyle, TFontStyles, TPenEndCap, TPenJoinStyle. > > I would like those definitions moved to GraphType or, better yet, to > FPCanvas. If no-one of the Lazarus team objects, I can put them in FPCanvas, and then you can make the current definitions in Lazarus an alias for the FPCanvas types.

Sure. maybe you can even add corresponfing properties (Pen.EndCap, Pen.JoinStyle etc)
with empty implementations

Alexander S. Klenin

Reply by email