Skip to content

Add PaintBrush class with gradients to gb.web.gui

Bruce Steers requested to merge (removed):web-gui-brush into master

[GB.WEB.GUI]

  • NEW: PaintBrush.class for Colors,Images,Gradients (images not implemented yet)
  • NEW: Gradient.class to create Linear and Radial gradients.
  • NEW: implement Paint.LinearGradient()
  • NEW: implement Paint.RadialGradient()
  • NEW: Color.ToHTML(GBColor As Integer) As String. converts a gambas color integer into html code.
  • OPT: Create a Paint folder to organize all Paint related classes.
  • NEW: if no Style argument given for Stroke() / Fill() then Brush is used.

Notes..
Yes i kept the ability to use css values. I think better to include it and warn in the wiki of the possible problems with using them than to completely deny the ability.

Color.ToHTML() i found the hidden WebForm._GetColor() function useful so added it to Color.class

I believe the implementation is correct but of course it requires your examination.

I have tried to mirror gui paint gradient functions (around my already created Gradient.class that worked fine). used the gui paint.class and Fabs ReportBrush.class for guidance.

Todo: implement images.

Not so sure PaintBrush needs to handle colors as the "Style" can simply be just a color value not a brush

Well wishes.

Edited by Benoît Minisini

Merge request reports