Kaydet (Commit) bf5d91d4 authored tarafından Luboš Luňák's avatar Luboš Luňák

fix off-by-one in WMF/EMF reading

It's rather lame that Rectangle from tools primarily specifies
the rectangle as topleft/bottomright, rather than topleft/size,
as that easily leads to confusion such as here.

Change-Id: Ice86fae90d9159b98e0896b6c875b99c3e1a3686
üst a6b68e0d
...@@ -1201,7 +1201,7 @@ void WMFReader::ReadWMF() ...@@ -1201,7 +1201,7 @@ void WMFReader::ReadWMF()
if( bEMFAvailable ) if( bEMFAvailable )
{ {
pOut->AddFromGDIMetaFile( aMeta ); pOut->AddFromGDIMetaFile( aMeta );
pOut->SetrclFrame( Rectangle(0, 0, aMeta.GetPrefSize().Width(), aMeta.GetPrefSize().Height() )); pOut->SetrclFrame( Rectangle( Point(0, 0), aMeta.GetPrefSize()));
// the stream needs to be set to the wmf end position, // the stream needs to be set to the wmf end position,
// otherwise the GfxLink that is created will be incorrect // otherwise the GfxLink that is created will be incorrect
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment