[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WebDrawingArea - Paint.Text function missing


If a create a simple demo project Web Application, even I don’t add a WebDrawingArea I have this error:

ERROR: #2: Cannot load class 'WFrmBug': File or directory does not exist

and the page don’t load

Olivier

> Le 29 août 2025 à 18:14, Bruce Steers <bsteers4@xxxxxxxxx> a écrit :
> 
> 
> 
> On Fri, 29 Aug 2025 at 21:46, Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx <mailto:benoit.minisini@xxxxxxxxxxxxxxxx>> wrote:
> Le 28/08/2025 à 20:41, Bruce Steers a écrit :
> > 
> > Re-submitted anyway.
> > https://gitlab.com/gambas/gambas/-/merge_requests/400 <https://gitlab.com/gambas/gambas/-/merge_requests/400> <https:// 
> > gitlab.com/gambas/gambas/-/merge_requests/400 <http://gitlab.com/gambas/gambas/-/merge_requests/400>>
> > 
> > It adds Paint.Font, Paint.FillText and Paint.StrokeText to the mix.
> > 
> > Paint font is a css string https://www.w3schools.com/cssref/ <https://www.w3schools.com/cssref/> 
> > pr_font_font.php <https://www.w3schools.com/cssref/pr_font_font.php <https://www.w3schools.com/cssref/pr_font_font.php>>
> > that's what the canvas wants, wasn't sure how to make it WebFont or if 
> > Benoit would think it should be or not.
> > 
> > Because Canvas has it's own fillText and strokeText functions i emulated 
> > them instead of using a method that would then use Paint.Stroke or 
> > Paint.Fill after.
> > 
> > Respects
> > BruceS
> > 
> 
> Hi,
> 
> 'Paint.DrawText()' and 'Paint.Font' were implemented in 'gb.web.gui' 
> since the last commit.
> 
> There is now a Font class, but only for Paint.
> 
> The WebControl has its own custom string 'Font' property, that is not 
> compatible. I will see if I can make WebControl understand this new Font 
> class.
> 
> I kept 'Paint.StrokeText()' and 'Paint.FillText()', but I'm not sure 
> that I won't remove them, because they are canvas specific.
> 
> By the way, canvas font support is really cumbersome, so you can't do 
> all what you can do with the GUI toolkits.
> 
> For example, I had to implement multiline text drawing with custom 
> javascript, because the canvas text routines are only single line!
> 
> And there is no support for text decoration (underline, strikeout...) 
> apparently.
> 
> Anyway, enjoy it!
> 
> -- 
> Benoît Minisini
> 
> Great work Ben, thank you.
> 
> some way to stroke or fill text is nice.
> currently with the strokeText and fillText I added we have more options to paint solid or outlined text with gradient colors
> 
> not sure if it can be done like gb.gui with Paint.Text() followed by a Fill or Stroke
> 
> Respects
> BruceS


Follow-Ups:
Re: WebDrawingArea - Paint.Text function missingBruce Steers <bsteers4@xxxxxxxxx>
References:
WebDrawingArea - Paint.Text function missingLinus <olivier.cruilles@xxxxxxxx>
Re: WebDrawingArea - Paint.Text function missingBruce Steers <bsteers4@xxxxxxxxx>
Re: WebDrawingArea - Paint.Text function missingBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: WebDrawingArea - Paint.Text function missingBruce Steers <bsteers4@xxxxxxxxx>
Re: WebDrawingArea - Paint.Text function missingBruce Steers <bsteers4@xxxxxxxxx>
Re: WebDrawingArea - Paint.Text function missingBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: WebDrawingArea - Paint.Text function missingBruce Steers <bsteers4@xxxxxxxxx>