2010-10-14 08:27:31 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 20:25:33 +01:00
|
|
|
/*
|
|
|
|
* 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 .
|
|
|
|
*/
|
2004-03-18 09:41:15 +00:00
|
|
|
|
2014-05-15 12:06:32 +02:00
|
|
|
#ifndef INCLUDED_CPPCANVAS_SOURCE_INC_OUTDEVSTATE_HXX
|
|
|
|
#define INCLUDED_CPPCANVAS_SOURCE_INC_OUTDEVSTATE_HXX
|
2004-03-18 09:41:15 +00:00
|
|
|
|
|
|
|
#include <com/sun/star/uno/Reference.hxx>
|
|
|
|
#include <com/sun/star/uno/Sequence.hxx>
|
|
|
|
|
2005-03-10 12:25:26 +00:00
|
|
|
#include <com/sun/star/rendering/StringContext.hpp>
|
|
|
|
#include <com/sun/star/rendering/RenderState.hpp>
|
|
|
|
#include <com/sun/star/rendering/XPolyPolygon2D.hpp>
|
|
|
|
#include <com/sun/star/rendering/XCanvasFont.hpp>
|
|
|
|
#include <com/sun/star/rendering/TextDirection.hpp>
|
2004-03-18 09:41:15 +00:00
|
|
|
#include <basegfx/matrix/b2dhommatrix.hxx>
|
2004-11-26 19:55:54 +00:00
|
|
|
#include <basegfx/polygon/b2dpolypolygon.hxx>
|
|
|
|
#include <vcl/fntstyle.hxx>
|
|
|
|
#include <vcl/vclenum.hxx>
|
2005-01-28 14:30:41 +00:00
|
|
|
#include <vcl/outdev.hxx>
|
2004-03-18 09:41:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace cppcanvas
|
|
|
|
{
|
|
|
|
namespace internal
|
|
|
|
{
|
|
|
|
struct OutDevState
|
|
|
|
{
|
|
|
|
OutDevState() :
|
2004-11-26 19:55:54 +00:00
|
|
|
clip(),
|
2005-01-28 14:30:41 +00:00
|
|
|
clipRect(),
|
2004-11-26 19:55:54 +00:00
|
|
|
xClipPoly(),
|
|
|
|
|
|
|
|
lineColor(),
|
|
|
|
fillColor(),
|
|
|
|
textColor(),
|
|
|
|
textFillColor(),
|
2018-10-31 23:55:31 +08:00
|
|
|
textOverlineColor(),
|
2004-11-26 19:55:54 +00:00
|
|
|
textLineColor(),
|
|
|
|
|
|
|
|
xFont(),
|
|
|
|
transform(),
|
2007-01-22 10:50:48 +00:00
|
|
|
mapModeTransform(),
|
2005-03-30 07:30:55 +00:00
|
|
|
fontRotation(0.0),
|
2004-11-26 19:55:54 +00:00
|
|
|
|
2018-10-24 00:03:41 +08:00
|
|
|
textEmphasisMark(FontEmphasisMark::NONE),
|
2014-10-06 14:48:16 +02:00
|
|
|
pushFlags(PushFlags::ALL),
|
2015-07-28 09:46:23 +02:00
|
|
|
textDirection(css::rendering::TextDirection::WEAK_LEFT_TO_RIGHT),
|
2004-11-26 19:55:54 +00:00
|
|
|
textAlignment(0), // TODO(Q2): Synchronize with implrenderer
|
|
|
|
// and possibly new rendering::TextAlignment
|
2016-05-29 20:23:09 +02:00
|
|
|
textReliefStyle(FontRelief::NONE),
|
2016-01-29 17:43:42 +11:00
|
|
|
textOverlineStyle(LINESTYLE_NONE),
|
|
|
|
textUnderlineStyle(LINESTYLE_NONE),
|
2004-11-26 19:55:54 +00:00
|
|
|
textStrikeoutStyle(STRIKEOUT_NONE),
|
2005-03-30 07:30:55 +00:00
|
|
|
textReferencePoint(ALIGN_BASELINE),
|
2004-11-26 19:55:54 +00:00
|
|
|
|
|
|
|
isTextOutlineModeSet( false ),
|
|
|
|
isTextEffectShadowSet( false ),
|
|
|
|
isTextWordUnderlineSet( false ),
|
|
|
|
|
2004-03-18 09:41:15 +00:00
|
|
|
isLineColorSet( false ),
|
|
|
|
isFillColorSet( false ),
|
|
|
|
isTextFillColorSet( false ),
|
2018-10-31 23:55:31 +08:00
|
|
|
isTextOverlineColorSet( false ),
|
2004-03-18 09:41:15 +00:00
|
|
|
isTextLineColorSet( false )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2015-07-28 09:46:23 +02:00
|
|
|
::basegfx::B2DPolyPolygon clip;
|
2017-03-30 20:27:55 +02:00
|
|
|
::tools::Rectangle clipRect;
|
2015-07-28 13:47:37 +02:00
|
|
|
css::uno::Reference< css::rendering::XPolyPolygon2D > xClipPoly;
|
2004-11-26 19:55:54 +00:00
|
|
|
|
2015-07-28 13:47:37 +02:00
|
|
|
css::uno::Sequence< double > lineColor;
|
|
|
|
css::uno::Sequence< double > fillColor;
|
|
|
|
css::uno::Sequence< double > textColor;
|
|
|
|
css::uno::Sequence< double > textFillColor;
|
2018-10-31 23:55:31 +08:00
|
|
|
css::uno::Sequence< double > textOverlineColor;
|
2015-07-28 13:47:37 +02:00
|
|
|
css::uno::Sequence< double > textLineColor;
|
2004-11-26 19:55:54 +00:00
|
|
|
|
|
|
|
/** Current font.
|
|
|
|
|
|
|
|
@attention Beware, this member can be NULL, and
|
|
|
|
nevertheless text output is generated.
|
|
|
|
*/
|
2015-07-28 13:47:37 +02:00
|
|
|
css::uno::Reference< css::rendering::XCanvasFont > xFont;
|
2015-07-28 09:46:23 +02:00
|
|
|
::basegfx::B2DHomMatrix transform;
|
|
|
|
::basegfx::B2DHomMatrix mapModeTransform;
|
|
|
|
double fontRotation;
|
|
|
|
|
2018-10-24 00:03:41 +08:00
|
|
|
FontEmphasisMark textEmphasisMark;
|
2015-07-28 09:46:23 +02:00
|
|
|
PushFlags pushFlags;
|
|
|
|
sal_Int8 textDirection;
|
|
|
|
sal_Int8 textAlignment;
|
2016-05-29 20:23:09 +02:00
|
|
|
FontRelief textReliefStyle;
|
2015-07-28 09:46:23 +02:00
|
|
|
sal_Int8 textOverlineStyle;
|
|
|
|
sal_Int8 textUnderlineStyle;
|
|
|
|
sal_Int8 textStrikeoutStyle;
|
|
|
|
TextAlign textReferencePoint;
|
|
|
|
|
|
|
|
bool isTextOutlineModeSet;
|
|
|
|
bool isTextEffectShadowSet;
|
|
|
|
bool isTextWordUnderlineSet;
|
|
|
|
|
|
|
|
bool isLineColorSet;
|
|
|
|
bool isFillColorSet;
|
|
|
|
bool isTextFillColorSet;
|
2018-10-31 23:55:31 +08:00
|
|
|
bool isTextOverlineColorSet;
|
2015-07-28 09:46:23 +02:00
|
|
|
bool isTextLineColorSet;
|
2004-03-18 09:41:15 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-05-15 12:06:32 +02:00
|
|
|
#endif // INCLUDED_CPPCANVAS_SOURCE_INC_OUTDEVSTATE_HXX
|
2010-10-14 08:27:31 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|