The Birdfont Source Code


All Repositories / birdfont.git / blobdiff – RSS feed

Point flags

Changes made to libsvgbird/Gradient.vala

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
--- libsvgbird/Gradient.vala +++ libsvgbird/Gradient.vala @@ -29,6 +29,15 @@ public Gradient () { stops = new Gee.ArrayList<Stop> (); transforms = new SvgTransforms (); + } + + public Stop get_stop (int index) { + if (unlikely (index < 0 || index >= stops.size)) { + warning ("Stop index out of bounds"); + return new Stop (); + } + + return stops.get (index); } public void copy_stops (Gradient g) {