mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 13:00:08 +00:00
generate 'none' for id_matrix
This commit is contained in:
parent
d1a5f8a3fe
commit
ead9f06281
@ -1,5 +1,8 @@
|
||||
/* Base CSS */
|
||||
/* by Wang Lu */
|
||||
body {
|
||||
position:relative;
|
||||
}
|
||||
#pdf-main {
|
||||
position:absolute;
|
||||
top:0;
|
||||
|
@ -97,18 +97,27 @@ void HTMLRenderer::export_transform_matrix (long long tm_id, const double * tm)
|
||||
// we have already shifted the origin
|
||||
|
||||
// TODO: recognize common matices
|
||||
auto prefixes = {"", "-ms-", "-moz-", "-webkit-", "-o-"};
|
||||
for(auto iter = prefixes.begin(); iter != prefixes.end(); ++iter)
|
||||
if(_tm_euqal(tm, id_matrix, 4))
|
||||
{
|
||||
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]) << ',';
|
||||
auto prefixes = {"", "-ms-", "-moz-", "-webkit-", "-o-"};
|
||||
for(auto iter = prefixes.begin(); iter != prefixes.end(); ++iter)
|
||||
css_fout << prefix << "transform:none;";
|
||||
}
|
||||
else
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user