mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-07-05 09:38:40 +00:00
generate 'none' for id_matrix
This commit is contained in:
parent
d1a5f8a3fe
commit
ead9f06281
|
@ -1,5 +1,8 @@
|
||||||
/* Base CSS */
|
/* Base CSS */
|
||||||
/* by Wang Lu */
|
/* by Wang Lu */
|
||||||
|
body {
|
||||||
|
position:relative;
|
||||||
|
}
|
||||||
#pdf-main {
|
#pdf-main {
|
||||||
position:absolute;
|
position:absolute;
|
||||||
top:0;
|
top:0;
|
||||||
|
|
|
@ -97,18 +97,27 @@ void HTMLRenderer::export_transform_matrix (long long tm_id, const double * tm)
|
||||||
// we have already shifted the origin
|
// we have already shifted the origin
|
||||||
|
|
||||||
// TODO: recognize common matices
|
// TODO: recognize common matices
|
||||||
auto prefixes = {"", "-ms-", "-moz-", "-webkit-", "-o-"};
|
if(_tm_euqal(tm, id_matrix, 4))
|
||||||
for(auto iter = prefixes.begin(); iter != prefixes.end(); ++iter)
|
|
||||||
{
|
{
|
||||||
const auto & prefix = *iter;
|
auto prefixes = {"", "-ms-", "-moz-", "-webkit-", "-o-"};
|
||||||
// PDF use a different coordinate system from Web
|
for(auto iter = prefixes.begin(); iter != prefixes.end(); ++iter)
|
||||||
css_fout << prefix << "transform:matrix("
|
css_fout << prefix << "transform:none;";
|
||||||
<< _round(tm[0]) << ','
|
}
|
||||||
<< _round(-tm[1]) << ','
|
else
|
||||||
<< _round(-tm[2]) << ','
|
{
|
||||||
<< _round(tm[3]) << ',';
|
auto prefixes = {"", "-ms-", "-moz-", "-webkit-", "-o-"};
|
||||||
|
for(auto iter = prefixes.begin(); iter != prefixes.end(); ++iter)
|
||||||
|
{
|
||||||
|
const auto & prefix = *iter;
|
||||||
|
// PDF use a different coordinate system from Web
|
||||||
|
css_fout << prefix << "transform:matrix("
|
||||||
|
<< _round(tm[0]) << ','
|
||||||
|
<< _round(-tm[1]) << ','
|
||||||
|
<< _round(-tm[2]) << ','
|
||||||
|
<< _round(tm[3]) << ',';
|
||||||
|
|
||||||
css_fout << "0,0);";
|
css_fout << "0,0);";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
css_fout << "}" << endl;
|
css_fout << "}" << endl;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user