FLTK logo

Re: [fltk.general] Does FLTK 1.4 support drawing gradients?

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Does FLTK 1.4 support drawing gradients? "'Mark' via fltk.general" Nov 30, 2021  
  Thanks for your replies. I'll probably try doing my drawing in SVG and then displaying the results.

On Tuesday, November 30, 2021 at 3:02:52 PM UTC Ian MacArthur wrote:
On Tue, 30 Nov 2021, 13:54 Albrecht Schlosser wrote:
On 11/30/21 1:33 PM 'Mark' via fltk.general wrote:
> Does FLTK 1.4 support drawing gradients? If so, can someone give me
> the link to the docs please?

There's no builtin gradient support (yet).

It is possible that this will be added in the future because drawing
gradients line by line (as it is done now where gradients are used)
suffers from alignment issues with different zoom factors.

That said, you can see an example in the "gleam" scheme:
https://github.com/fltk/fltk/blob/master/src/fl_gleam.cxx

Depending on what effect you are looking to achieve, it's probably also worth looking at the fltk SVG mechanism as that can draw fairly nice gradients too.

Or something using a fltk GL surface, I suppose.

Or (being deliberately obtuse!) I suppose, since you can draw individual pixels in a fltk draw method, you can "just" colour in the gradient "by hand"...

But there's no "built-in" fltk gradient mechanism...
--
Ian
From my Fairphone FP3

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/48e93e0c-df5d-495f-a3ac-7f7c5ca898f5n%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.