Gip-Gip / egui-plotter

Simple to use utilties for integrating plotter into egui
MIT License
45 stars 19 forks source link

Feathering #14

Open Resonanz opened 8 months ago

Resonanz commented 8 months ago

Does turning off the feathering turn it off for the entire GUI or just the plot ?

tomtuamnuq commented 7 months ago

Hi @Resonanz , the feathering is turned off at the egui::Context level. Each Context ctx refers to the same mutable data (interior mutability). So yes, the following code turnes feathering off for the entire GUI:

ctx.tessellation_options_mut(|tess_options| {
            tess_options.feathering = false;
        });

Containers, such as egui::containers::Window do not have separate tessalation options. A egui::Ui (where you place widgets on) has a reference to the parent ctx Context and no separate tessalation options.

There is a tesselate method in egui::Context, so maybe you can tesselate certain Shapes even though the tesselation is turned off globally.