Re: Re: commit: abi: remove bad color names, don't special-case ffffff

From: F J Franklin (F.J.Franklin@sheffield.ac.uk)
Date: Mon Mar 17 2003 - 04:54:34 EST

  • Next message: Dom Lachowicz: "Commit: OO style import work"

    On Sun, 16 Mar 2003 william.lachance@sympatico.ca wrote:
    >> On Sun, 16 Mar 2003, F J Franklin wrote:
    >>> I don't know who added "ffffff" and "transparent" to the list of named
    >>> colors (which I spent ages copying out from the SVG standard), or why, but
    >>> if there's a reason can whoever please find a different solution to their
    >>> problem.
    >>>
    >>> Also, UT_parseColor was equateing "ffffff" with "transparent" - which
    >>> seemed a little daft to me. ffffff is white, not transparent. After all,
    >>> what happens if the page background isn't white?
    >>
    >> That was me. I put them in there for backwards compatibility. If a
    >> property of color is found with the name "transperent" then the background
    >> color is not drawn. This is very useful for "highlighting" colors.
    >>
    >> The re now exist many documents in the wild with "transperent" and
    >> "ffffff" in them. We have to continue to support them.

    transparent and ffffff are still supported as colors, but they are not
    color names.

    I have no problems with transparent or ffffff used as colors. But if some
    documents use ffffff to mean transparent then how are we supposed to know
    they mean transparent and not white? Let's play it safe and assume that
    ffffff is exactly what it appears to be and not second-guess the color.

    Oh, and I've noticed at least one other place in AbiWord's code where
    they're still equated.

    > Couldn't we handle this problem at the filter level? Seems far more
    > sensible to me than polluting the mainline of the codebase with these
    > special cases..

    Part of the problem is that ie_imp/exp_AbiWord_1 are not really filters,
    they're more a literal conversion of XML to PD_Document.

    But I agree.

    Regards, Frank

    Francis James Franklin
    F.J.Franklin@shef.ac.uk

    Persuasion is Aphrodite's daughter;
    it is she who beguiles our mortal hearts
                                                                  - Sappho



    This archive was generated by hypermail 2.1.4 : Mon Mar 17 2003 - 05:01:57 EST