wxGraphicsGradientStops(3)

πŸ“¦
version 29.0.6 Β· 3 versions
, in ubuntu stonking

πŸ’– wxGraphicsGradientStops(3) β€” Erlang Module Definition πŸ’–

okay bestie, gather round, because today we're talking about wxGraphicsGradientStops, a whole module in the wx Erlang docs, and honestly? it's giving palette curator. it's giving "I hold all the little colour stops so your gradient can pop off." πŸŽ€


✨ NAME ✨

wxGraphicsGradientStops β€” represents a collection of wxGraphicGradientStop values for use with CreateLinearGradientBrush and CreateRadialGradientBrush. 🌈


🌸 DESCRIPTION 🌸

so the vibe here is: your stops stay in order of position. that's the whole personality. if two or more stops get added with the same position, then the one(s) added later come later. not a bug, not a glitch β€” that's actually useful, because it lets you produce discontinuities in the colour gradient. hard edges?? we love a hard edge when we asked for one. πŸ’…

⚠️ important heads up, bestie: this class is write-once. you cannot modify the stops once they've been added. no take-backs. no edits. it's done, it's iconic, it's locked in. πŸ”’

Since: 2.9.1 ⭐

wxWidgets docs: wxGraphicsGradientStops πŸ¦‹


🧚 DATA TYPES 🧚

  • wxGraphicsGradientStops() :: wx:wx_object().

πŸ‘‘ FUNCTIONS πŸ‘‘

  • add(This, Col, Pos) -> ok β€” add a new stop. that's it, that's the function, go off. ✨
add(This, Col, Pos) -> ok
             when
                 This :: wxGraphicsGradientStops(),
                 Col :: wx:wx_colour(),
                 Pos :: number().
  • destroy(This :: wxGraphicsGradientStops()) -> ok. β€” destroys the object. rip little gradient collection, you served. πŸ’€
  • getCount(This) -> integer() when This :: wxGraphicsGradientStops(). β€” returns the number of stops. counting era. πŸ”’
  • getEndColour(This) -> wx:wx_colour4() when This :: wxGraphicsGradientStops(). β€” returns the end colour. the finale. the last look. πŸ’œ
  • getStartColour(This) -> wx:wx_colour4() when This :: wxGraphicsGradientStops(). β€” returns the start colour. the opening act. 🌸
  • item(This, N) -> {wx:wx_colour4(), float()} when This :: wxGraphicsGradientStops(), N :: integer(). β€” returns the stop at the given index. yes, you can just grab one by number, no cap. πŸ™ˆ
  • new([Option]) -> wxGraphicsGradientStops() β€” initializes the gradient stops with the given boundary colours. creates a wxGraphicsGradientStops instance with start colour given by startCol and end colour given by endCol. the Option type is {startCol, wx:wx_colour()} | {endCol, wx:wx_colour()}. 🫢
new([Option]) -> wxGraphicsGradientStops()
             when
                 Option ::
                     {startCol, wx:wx_colour()} |
                     {endCol, wx:wx_colour()}.
  • setEndColour(This, Col) -> ok β€” set the end colour to col. (even though, reminder, this class is write-once β€” the original doc says so, i'm just the messenger bestie 😭)
setEndColour(This, Col) -> ok
                      when
                          This :: wxGraphicsGradientStops(),
                          Col :: wx:wx_colour().
  • setStartColour(This, Col) -> ok β€” set the start colour to col. same energy, different end of the gradient. πŸŽ€
setStartColour(This, Col) -> ok
                        when
                            This :: wxGraphicsGradientStops(),
                            Col :: wx:wx_colour().

πŸ’– reminder bestie: every stop, every colour, every position β€” they all matter, and they all have to be in the right order. that's the whole point. main character energy for your gradient. periodt. πŸ‘‘

and that's the tea!! πŸ“ this page came to you from Ericsson AB, wx version 2.6, under the wxGraphicsGradientStops(3) name. go make something pretty, ily, bye!! πŸŒˆβœ¨πŸ¦‹

πŸ“¦ where this page comes from