Closed carlosame closed 1 year ago
Batik was written with the assumption that pixel units would have a fixed resolution, and changing this affects to a number of places (including all the transformations). Modifying this fundamental design decision would involve a large amount of work, including the creation of a number of tests to verify that all the scaling is done properly. This project has limited development resources and there is no justification for the effort.
Unfortunately, this also prevents fixing the non-conformant unit conversions in the CSS module. After a small cleanup, I'm closing this issue as "not planned".
Method
getPixelToMM()
was intended to be removed from Batik and should be removed from EchoSVG. Also,getPixelUnitToMillimeter()
is obsolete and should be replaced by a modern concept of resolution (the pixel/mm ratio was long ago set to a fixed quantity in CSS).The methods belong to:
bridge.UserAgent
dom.svg.SVGContext
parser.UnitProcessor.Context
and there is also
getPixelToMillimeter()
that should be removed fromcss.engine.CSSContext
andbridge.BridgeContext
.The following steps could be followed:
1) Deprecate
getPixelToMM()
andgetPixelToMillimeter()
for removal. (Milestone 0.2.1)2)
Introduce a newKEY_RESOLUTION_DPI
transcoding hint and use it as the basis for resolution computations. (Milestone 0.3)3)
DeprecategetPixelUnitToMillimeter()
. (Milestone 0.3)4)
RemovegetPixelToMM()
andgetPixelToMillimeter()
. (Milestone 0.3)EDIT: this issue involves more work (and writing more tests) than anticipated, so the
KEY_RESOLUTION_DPI
transcoding hint won't be introduced for now.