/* -*- 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 .
*/
// get 3D Object Attributes
drawinglayer::attribute::Sdr3DObjectAttribute aSdr3DObjectAttribute(drawinglayer::primitive2d::createNewSdr3DObjectAttribute(rItemSet));
// this is a polygon object, so Width/Height and/or Depth may be zero (e.g. left // wall of chart). Take this into account if(basegfx::fTools::equalZero(aObjectRange.getWidth()))
{ // width is zero, use height and depth
fWidth = aObjectRange.getHeight();
fHeight = aObjectRange.getDepth();
} elseif(basegfx::fTools::equalZero(aObjectRange.getHeight()))
{ // height is zero, use width and depth
fWidth = aObjectRange.getWidth();
fHeight = aObjectRange.getDepth();
} else
{ // use width and height
fWidth = aObjectRange.getWidth();
fHeight = aObjectRange.getHeight();
}
if(fWidth <= 0.0 || fHeight <= 0.0)
{ // no texture; fallback to very small size
aTextureSize.setX(0.01);
aTextureSize.setY(0.01);
} else
{
aTextureSize.setX(fWidth);
aTextureSize.setY(fHeight);
}
}
// #i98295# // unfortunately, this SdrObject type which allows a free 3d geometry definition was defined // wrong topologically in relation to its plane normal and 3D visibility when it was invented // a long time ago. Since the API allows creation of this SDrObject type, it is not possible to // simply change this definition. Only the chart should use it, and at least this object type // only exists at Runtime (is not saved and/or loaded in any FileFormat). Still someone external // may have used it in its API. To not risk wrong 3D lightings, I have to switch the orientation // of the polygon here
aPolyPolygon3D.flip();
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.