/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
namespace
{ constunsignedchar nTopBitInt7 = 0x80; constunsignedchar nSignBitInt7 = 0x40; // include the sign bit so if it's negative we get // that "missing" bit pre-set to 1 constunsignedchar nValueMaskInt7 = 0x7F;
}
if (!bLines)
pPointTypes.reset( new sal_uInt8 [_nPoints] );
}
EMFPPath::~EMFPPath ()
{
}
void EMFPPath::Read (SvStream& s, sal_uInt32 pathFlags)
{ float fx, fy; for (sal_uInt32 i = 0; i < nPoints; i++)
{ if (pathFlags & 0x800)
{ // EMFPlusPointR: points are stored in EMFPlusInteger7 or // EMFPlusInteger15 objects, see section 2.2.2.21/22 // If 0x800 bit is set, the 0x4000 bit is undefined and must be ignored
sal_Int32 x = GetEmfPlusInteger(s);
sal_Int32 y = GetEmfPlusInteger(s);
xPoints.push_back(x);
yPoints.push_back(y);
SAL_INFO("drawinglayer.emf", "EMF+\t\t\t" << i << ". EmfPlusPointR [x,y]: " << x << ", " << y);
} elseif (pathFlags & 0x4000)
{ // EMFPlusPoint: stored in signed short 16bit integer format
sal_Int16 x, y;
s.ReadInt16(x).ReadInt16(y);
SAL_INFO("drawinglayer.emf", "EMF+\t\t\t" << i << ". EmfPlusPoint [x,y]: " << x << ", " << y);
xPoints.push_back(x);
yPoints.push_back(y);
} else
{ // EMFPlusPointF: stored in Single (float) format
s.ReadFloat(fx).ReadFloat(fy);
SAL_INFO("drawinglayer.emf", "EMF+\t" << i << ". EMFPlusPointF [x,y]: " << fx << ", " << fy);
xPoints.push_back(fx);
yPoints.push_back(fy);
}
}
if (pPointTypes)
{ for (sal_uInt32 i = 0; i < nPoints; i++)
{
s.ReadUChar(pPointTypes[i]);
SAL_INFO("drawinglayer.emf", "EMF+\tpoint type: 0x" << std::hex << static_cast<int>(pPointTypes[i]) << std::dec);
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.