Skip to content
  • Martin Owens's avatar
    Reactor Inkscape to use the new color model framework · 0b4d3151
    Martin Owens authored
    Main movement of the previous color handling code:
    
     * Removal of color.cpp, which is now replaced by the class in colors/color
     * Removal of svg/svg-color.cpp, which is now replaced by colors/color for full color handling and colors/parser for parsing.
     * Removal of color-rgba.h which is now replaced by colors/color and ui/utils for Gdk conversions
     * Removal of color/color-conv.cpp into colors/parser
     * Removal of color/color-profile-cms-fns.h as all the cms encapsulation is already done above.
     * Removal of widgets/paintdef.cpp, which was a duplicate color structure, xml functionality moved to colors/xml-color.cpp
     * Removal of svg/svg-renderer.cpp color code, Gdk coversions moved to ui/utils and css code is now an Inkscape::Color object.
     * Removal of svg-color and oklab tests which are entirely replaced by colors/*tests
     * Refactor global-palettes.cpp to remove all custom rgb building and instead build Color objects directly.
     * Refactor color-icc-selector removing most of it's own code in favor of the cms and color space API
     * Moving of color/cmyk-conv.cpp into colors/spaces/cmyk and regularised into a color space class.
     * Moving of hsluv.cpp and oklab.cpp which are split and regularised into many colors/spaces/hsluv and ok color space classes
     * Moving of color/cms-* into colors/cms/* with some of the code from object/colorprofile.cpp to restrict the use of lcms2 to just this directory and make the accessing of cms profiles and transforms predictable and less error prone.
     * Moving of profile-manager.cpp functionality colors/tracker.cpp rewritten to create the new icc color space objects.
     * Moving of ui/selected-color.cpp functionality to colors/color-set rewritten to be a collection of trackable color objects.
    
    Refactoring actions:
    
     * Refactor style color to remove SPColor and Href values, add a private Inkscape::Color and getter/setter functions.
     * Refactor style alpha so it can be used as a double transparently without conversion.
     * Refactor SP-Stop color to bundle opacity and simplify how color is used.
     * Refactor filter constructors to stop constructing their own rgb css color formats
     * Remove extract color functions from preferences and replace with getColor and setColor which take the new color object.
     * Remove use of SPColor from anywhere it's being used and replace with Inkscape::Color object
     * Remove SP_RGBA32_G_F and similar macros to construct colors, or convert them from preferences.
     * Remove custom checkerboard darken and use new color utils and cairo utils
     * Remove custom HSL tweaking code from selected-style
     * Remove SPIPaint::read function used in sp-stop, it was basically just a color parser
     * Add cairo color functions into display/cairo-utils.cpp which centralise conversion to RGBA; to make it easier to replace later.
     * Use colors/utils `make_contrasted_color` for finding consistant contrasting colors, replacing copy pasta calculations.
     * Removal of icc profile specific code in display/nr-filter-* code
     * Use Color Tracker object in document.cpp instead of the now deleted Profile Manager
     * Use Color utils hex parsing for Gtk/css handling in themes instead of `sp_svg_write_color`
     * Use Color in lpe color values, removing duplicated color parsing and printing.
     * Use Color for item highlight color and plug into various gtk widgets.
     * Use average color util in GrDrag instead of internal rgb calculation.
     * Drag and drop colors using new xml and mime type code in colors/dragndrop.cpp
     * Convert SP Grid to use color objects instead of RGBA ints
     * Use color/cms framework instead of lcms2 directly in sp-image
     * Use getColor to handle opacity and color in gradients and mesh gradients
     * Use Color object in extensions param color.
     * Parse colors using new parsers in internal extensions.
     * Replace color average or blending with colors/utils average color methods
     * Use color module in swatches and palettes for parsing out any color needed
     * Use of HSL space inside color object instead of converting to and fro in color manipulation code
     * Use average_color_between for all color dividers such as gradient-dragging and desktop-style
     * Focus all uses of cairo context setting through display/cairo-utils.cpp color setting functions
     * Use a standard toColorRef function in emf/wmf extensions to convert colors.
     * Generate base64 from icc profiles found in pdf files using the cms object
     * Document properties to use the internal ColorProfile generator instead of it's own xml code
     * Convert tool and desktop prefs color from guint32 to optional Color objects for preference setting/getting
     * Use util Colors::lightness instead of SP_RGBA32_LUMINANCE
     * Fix TODO issue with selected color not calling update when dragging had finished
     * Move color wheels to use color objects and tie in where possible.
     * ColorPicker is now a derived widget instead of being a button in a button
    
    Other things:
    
     * Add `sp_repr_css_set_property_string` to xml/repr.h to handle setting std::string
     * Add gtk adjustment functions to ui/util.cpp to replace color-scale specific code
     * Give SPIScale24 a setter and getter for double instead of requiring the use of SP_SCALE24_TO/FROM_FLOAT at every use.
     * Removed a useless _cmp method in document-properties
    0b4d3151
Loading