214 lines
6.4 KiB
Markdown
214 lines
6.4 KiB
Markdown
# orx-shade-styles
|
|
|
|
Shader based fills and strokes, including various types of gradient fills.
|
|
|
|
<!-- __demos__ >
|
|
# Demos
|
|
[DemoRadialGradient01Kt](src/demo/kotlin/DemoRadialGradient01Kt.kt
|
|

|
|
|
|
[source code](src/jvmDemo/kotlin/clip/DemoClip01.kt)
|
|
|
|
### clip/DemoClip02
|
|
|
|
|
|
|
|

|
|
|
|
[source code](src/jvmDemo/kotlin/clip/DemoClip02.kt)
|
|
|
|
### clip/DemoClip03
|
|
|
|
|
|
|
|

|
|
|
|
[source code](src/jvmDemo/kotlin/clip/DemoClip03.kt)
|
|
|
|
### composed/DemoComposed01
|
|
|
|
The main entry point of the application that sets up the visual program.
|
|
|
|
This method creates a graphical program with a 720x720 window and uses a rotating
|
|
gradient-shaded rectangle as the primary visual element. It demonstrates the use
|
|
of gradient shading and clipping through a compositional approach.
|
|
|
|
The method performs the following actions:
|
|
1. Configures the application window size.
|
|
2. Constructs a conic gradient with a rotation of 54 degrees and full circular coverage.
|
|
3. Creates a star-shaped clip with configurable sharpness, radius, and number of sides.
|
|
4. Combines the gradient and clip into a composite shading style.
|
|
5. Defines a program loop where the rectangle with the gradient and clip combination
|
|
rotates around the center of the canvas while being redrawn continuously.
|
|
|
|

|
|
|
|
[source code](src/jvmDemo/kotlin/composed/DemoComposed01.kt)
|
|
|
|
### gradients/DemoGradient01
|
|
|
|
|
|
|
|

|
|
|
|
[source code](src/jvmDemo/kotlin/gradients/DemoGradient01.kt)
|
|
|
|
### gradients/DemoGradient02
|
|
|
|
|
|
|
|

|
|
|
|
[source code](src/jvmDemo/kotlin/gradients/DemoGradient02.kt)
|
|
|
|
### gradients/DemoGradient03
|
|
|
|
|
|
|
|

|
|
|
|
[source code](src/jvmDemo/kotlin/gradients/DemoGradient03.kt)
|
|
|
|
### gradients/DemoGradient04
|
|
|
|
|
|
|
|

|
|
|
|
[source code](src/jvmDemo/kotlin/gradients/DemoGradient04.kt)
|
|
|
|
### gradients/DemoGradient05
|
|
|
|
|
|
|
|

|
|
|
|
[source code](src/jvmDemo/kotlin/gradients/DemoGradient05.kt)
|
|
|
|
### gradients/DemoGradient06
|
|
|
|
|
|
|
|

|
|
|
|
[source code](src/jvmDemo/kotlin/gradients/DemoGradient06.kt)
|
|
|
|
### gradients/DemoGradient07
|
|
|
|
|
|
|
|

|
|
|
|
[source code](src/jvmDemo/kotlin/gradients/DemoGradient07.kt)
|
|
|
|
### gradients/DemoGradient08
|
|
|
|
|
|
|
|

|
|
|
|
[source code](src/jvmDemo/kotlin/gradients/DemoGradient08.kt)
|
|
|
|
### gradients/DemoGradient09
|
|
|
|
|
|
|
|

|
|
|
|
[source code](src/jvmDemo/kotlin/gradients/DemoGradient09.kt)
|
|
|
|
### image/DemoImageFill01
|
|
|
|
|
|
|
|

|
|
|
|
[source code](src/jvmDemo/kotlin/image/DemoImageFill01.kt)
|
|
|
|
### image/DemoImageFill02
|
|
|
|
|
|
|
|

|
|
|
|
[source code](src/jvmDemo/kotlin/image/DemoImageFill02.kt)
|
|
|
|
### image/DemoImageFill03
|
|
|
|
|
|
|
|

|
|
|
|
[source code](src/jvmDemo/kotlin/image/DemoImageFill03.kt)
|
|
|
|
### noise/DemoBlueNoise01
|
|
|
|
|
|
|
|

|
|
|
|
[source code](src/jvmDemo/kotlin/noise/DemoBlueNoise01.kt)
|
|
|
|
### noise/DemoSimplex01
|
|
|
|
|
|
|
|

|
|
|
|
[source code](src/jvmDemo/kotlin/noise/DemoSimplex01.kt)
|
|
|
|
### noise/DemoWhiteNoise01
|
|
|
|
|
|
|
|

|
|
|
|
[source code](src/jvmDemo/kotlin/noise/DemoWhiteNoise01.kt)
|
|
|
|
### patterns/DemoPatterns01
|
|
|
|
|
|
|
|

|
|
|
|
[source code](src/jvmDemo/kotlin/patterns/DemoPatterns01.kt)
|
|
|
|
### patterns/DemoPatterns02
|
|
|
|
|
|
|
|

|
|
|
|
[source code](src/jvmDemo/kotlin/patterns/DemoPatterns02.kt)
|
|
|
|
### patterns/DemoPatterns03
|
|
|
|
|
|
|
|

|
|
|
|
[source code](src/jvmDemo/kotlin/patterns/DemoPatterns03.kt)
|
|
|
|
### spatial/DemoHemisphere01
|
|
|
|
|
|
|
|

|
|
|
|
[source code](src/jvmDemo/kotlin/spatial/DemoHemisphere01.kt)
|
|
|
|
### spatial/DemoVisualizeNormals01
|
|
|
|
|
|
|
|

|
|
|
|
[source code](src/jvmDemo/kotlin/spatial/DemoVisualizeNormals01.kt)
|