pdf: don't emit scientific notation when using floating point
fmt {:g} will sometimes put in scientific notation, e.g. 1.0e6 when we
pass some sizes of numbers. PDF doesn't accept scientific notation for
numbers, so make sure we convert those. Postscript seems to accept these
just fine so limit the fix to PDF.
I don't know that we were hitting these before, but my previous fix for
the background position caused some exponentially formatted numbers.
This commit is contained in:
@@ -508,6 +508,9 @@ protected:
|
||||
/// string PDF format (convert special chars and non ascii7 chars)
|
||||
std::string encodeStringForPlotter( const wxString& aUnicode ) override;
|
||||
|
||||
/// Convert a double to a PDF-compatible numeric token (no exponent notation).
|
||||
std::string encodeDoubleForPlotter( double aValue ) const;
|
||||
|
||||
/**
|
||||
* PDF supports colors fully. It actually has distinct fill and pen colors,
|
||||
* but we set both at the same time.
|
||||
|
||||
Reference in New Issue
Block a user