From 2392f458afd4030364c6de1fdc94e6ea1834791b Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Thu, 22 Dec 2022 20:29:35 +0100 Subject: [PATCH] more gradient examples --- playground/gradients/main.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/playground/gradients/main.cpp b/playground/gradients/main.cpp index ef131861..978c7a9a 100644 --- a/playground/gradients/main.cpp +++ b/playground/gradients/main.cpp @@ -45,8 +45,22 @@ namespace } QskGradient gradient; +#if 1 gradient.setLinearDirection( 0.0, 0.0, 1.0, 1.0 ); - gradient.setSpreadMode( QskGradient::RepeatSpread ); +#endif +#if 0 + gradient.setLinearDirection( 0.2, 0.2, 0.7, 0.5 ); + gradient.setSpreadMode( QskGradient::PadSpread ); +#endif +#if 0 + gradient.setRadialDirection( 0.25, 0.75, 0.25 ); + gradient.setSpreadMode( QskGradient::ReflectSpread ); +#endif +#if 0 + gradient.setConicDirection( 0.25, 0.75, 0, 90 ); + gradient.setSpreadMode( QskGradient::ReflectSpread ); +#endif + gradient.setStops( stops ); showGradient( gradient );