LibreOffice Module cppcanvas (master) 1
action.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include <sal/types.h>
23
24namespace basegfx
25{
26 class B2DHomMatrix;
27 class B2DRange;
28}
29
30
31/* Definition of Action interface */
32
34 {
41 class Action
42 {
43 public:
59 struct Subset
60 {
66 sal_Int32 mnSubsetBegin;
67
74 sal_Int32 mnSubsetEnd;
75 };
76
77 virtual ~Action() {}
78
87 virtual bool render( const ::basegfx::B2DHomMatrix& rTransformation ) const = 0;
88
103 virtual bool renderSubset( const ::basegfx::B2DHomMatrix& rTransformation,
104 const Subset& rSubset ) const = 0;
105
114 virtual ::basegfx::B2DRange getBounds( const ::basegfx::B2DHomMatrix& rTransformation ) const = 0;
115
129 virtual ::basegfx::B2DRange getBounds( const ::basegfx::B2DHomMatrix& rTransformation,
130 const Subset& rSubset ) const = 0;
131
141 virtual sal_Int32 getActionCount() const = 0;
142 };
143}
144
145/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Interface for internal render actions.
Definition: action.hxx:42
virtual ::basegfx::B2DRange getBounds(const ::basegfx::B2DHomMatrix &rTransformation) const =0
Query bounds of this action on the associated canvas.
virtual bool render(const ::basegfx::B2DHomMatrix &rTransformation) const =0
Render this action to the associated canvas.
virtual sal_Int32 getActionCount() const =0
Query action count.
virtual ::basegfx::B2DRange getBounds(const ::basegfx::B2DHomMatrix &rTransformation, const Subset &rSubset) const =0
Query bounds for the given part of the action on the associated canvas.
virtual bool renderSubset(const ::basegfx::B2DHomMatrix &rTransformation, const Subset &rSubset) const =0
Render the given part of the action to the associated canvas.
Used for rendering action subsets.
Definition: action.hxx:60
sal_Int32 mnSubsetBegin
Denotes start of the subset.
Definition: action.hxx:66
sal_Int32 mnSubsetEnd
Denotes end of the subset.
Definition: action.hxx:74