Files
libreoffice/canvas/source/vcl/canvascustomsprite.cxx

179 lines
6.8 KiB
C++
Raw Normal View History

/* -*- 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 .
*/
INTEGRATION: CWS presentationengine01 (1.2.2); FILE MERGED 2004/11/17 17:00:28 thb 1.2.2.20: #118514# Canvas module reorg 2004/10/26 23:36:58 thb 1.2.2.19: #110496# Added dedicated alpha bitmap support: factory methods at the XGraphicDevice, and optimized handling internally 2004/10/25 19:07:44 thb 1.2.2.18: #i20518# Improved canvas performance for sprite rendering 2004/10/11 00:00:05 thb 1.2.2.17: #i34997# Added new method XCanvas::drawBitmapModulated(), to facilitate global alpha channel changes when rendering bitmaps 2004/09/09 14:44:31 thb 1.2.2.16: #110496# Fixed minor map file issues; changed order of canvas instantiations in canvas factory; added sprite clipping to DirectX canvas 2004/09/06 13:33:45 thb 1.2.2.15: #110496# Improved documentation 2004/09/01 10:50:36 thb 1.2.2.14: #110496# Optimized sprite repaint (for static sprite content) 2004/08/27 18:46:16 thb 1.2.2.13: #110496# Adapted to recent canvas API changes (XSpriteCanvas::updateScreen and sprite clip semantics 2004/08/26 12:23:40 thb 1.2.2.12: #110496# Fixed a nasty update bug (hidden sprites where not cleared, when not part of other update areas by chance) 2004/08/20 00:27:10 thb 1.2.2.11: #110496# Added TODO comment 2004/08/06 14:00:09 thb 1.2.2.10: #110496# Adapted XSprite API to match reality (the way it was simply wasn't logical). Implemented sprite clipping 2004/08/02 17:50:59 thb 1.2.2.9: #110496# Adapted to recent XCanvas API changes, streamlined and factored out common code with directxcanvas 2004/07/22 20:38:27 thb 1.2.2.8: #110496# Adapted to setData/setPixel API change 2004/07/22 18:40:42 thb 1.2.2.7: #110496# Overhauled sprite redraw algo, to also respect overlapping sprites 2004/07/20 19:23:55 thb 1.2.2.6: #110496# Removed self-references to various interface implementations, along the lines, factored out common base implementation for all c++ canvases 2004/06/17 10:33:25 thb 1.2.2.5: #110496# Handle huge shrinks correctly for font scaling; added some more debug code 2004/05/27 20:51:24 thb 1.2.2.4: #110496# Added classification code to all TODO/HACK/FIXME comments. There are four categories: - code quality (C) - performance (P) - missing functionality (F) - and missing/incomplete error handling (E) Furthermore, every category has a severity number between 1 and 3 associated, where 1 is lowest and 3 highest severity 2004/05/27 14:36:52 thb 1.2.2.3: #110496# verbose tracing is now guarded also with DBG_UTIL. Unified verbose trace output between directx and VCL canvas 2004/04/12 15:12:24 thb 1.2.2.2: #110496# Adaptions after canvas01 merge 2004/04/05 15:57:57 thb 1.2.2.1: Resync with canvas01 changes
2004-11-26 16:11:13 +00:00
#include <canvas/debug.hxx>
#include <tools/diagnose_ex.h>
INTEGRATION: CWS presentationengine01 (1.2.2); FILE MERGED 2004/11/17 17:00:28 thb 1.2.2.20: #118514# Canvas module reorg 2004/10/26 23:36:58 thb 1.2.2.19: #110496# Added dedicated alpha bitmap support: factory methods at the XGraphicDevice, and optimized handling internally 2004/10/25 19:07:44 thb 1.2.2.18: #i20518# Improved canvas performance for sprite rendering 2004/10/11 00:00:05 thb 1.2.2.17: #i34997# Added new method XCanvas::drawBitmapModulated(), to facilitate global alpha channel changes when rendering bitmaps 2004/09/09 14:44:31 thb 1.2.2.16: #110496# Fixed minor map file issues; changed order of canvas instantiations in canvas factory; added sprite clipping to DirectX canvas 2004/09/06 13:33:45 thb 1.2.2.15: #110496# Improved documentation 2004/09/01 10:50:36 thb 1.2.2.14: #110496# Optimized sprite repaint (for static sprite content) 2004/08/27 18:46:16 thb 1.2.2.13: #110496# Adapted to recent canvas API changes (XSpriteCanvas::updateScreen and sprite clip semantics 2004/08/26 12:23:40 thb 1.2.2.12: #110496# Fixed a nasty update bug (hidden sprites where not cleared, when not part of other update areas by chance) 2004/08/20 00:27:10 thb 1.2.2.11: #110496# Added TODO comment 2004/08/06 14:00:09 thb 1.2.2.10: #110496# Adapted XSprite API to match reality (the way it was simply wasn't logical). Implemented sprite clipping 2004/08/02 17:50:59 thb 1.2.2.9: #110496# Adapted to recent XCanvas API changes, streamlined and factored out common code with directxcanvas 2004/07/22 20:38:27 thb 1.2.2.8: #110496# Adapted to setData/setPixel API change 2004/07/22 18:40:42 thb 1.2.2.7: #110496# Overhauled sprite redraw algo, to also respect overlapping sprites 2004/07/20 19:23:55 thb 1.2.2.6: #110496# Removed self-references to various interface implementations, along the lines, factored out common base implementation for all c++ canvases 2004/06/17 10:33:25 thb 1.2.2.5: #110496# Handle huge shrinks correctly for font scaling; added some more debug code 2004/05/27 20:51:24 thb 1.2.2.4: #110496# Added classification code to all TODO/HACK/FIXME comments. There are four categories: - code quality (C) - performance (P) - missing functionality (F) - and missing/incomplete error handling (E) Furthermore, every category has a severity number between 1 and 3 associated, where 1 is lowest and 3 highest severity 2004/05/27 14:36:52 thb 1.2.2.3: #110496# verbose tracing is now guarded also with DBG_UTIL. Unified verbose trace output between directx and VCL canvas 2004/04/12 15:12:24 thb 1.2.2.2: #110496# Adaptions after canvas01 merge 2004/04/05 15:57:57 thb 1.2.2.1: Resync with canvas01 changes
2004-11-26 16:11:13 +00:00
#include <canvas/verbosetrace.hxx>
#include <cppuhelper/supportsservice.hxx>
INTEGRATION: CWS presentationengine01 (1.2.2); FILE MERGED 2004/11/17 17:00:28 thb 1.2.2.20: #118514# Canvas module reorg 2004/10/26 23:36:58 thb 1.2.2.19: #110496# Added dedicated alpha bitmap support: factory methods at the XGraphicDevice, and optimized handling internally 2004/10/25 19:07:44 thb 1.2.2.18: #i20518# Improved canvas performance for sprite rendering 2004/10/11 00:00:05 thb 1.2.2.17: #i34997# Added new method XCanvas::drawBitmapModulated(), to facilitate global alpha channel changes when rendering bitmaps 2004/09/09 14:44:31 thb 1.2.2.16: #110496# Fixed minor map file issues; changed order of canvas instantiations in canvas factory; added sprite clipping to DirectX canvas 2004/09/06 13:33:45 thb 1.2.2.15: #110496# Improved documentation 2004/09/01 10:50:36 thb 1.2.2.14: #110496# Optimized sprite repaint (for static sprite content) 2004/08/27 18:46:16 thb 1.2.2.13: #110496# Adapted to recent canvas API changes (XSpriteCanvas::updateScreen and sprite clip semantics 2004/08/26 12:23:40 thb 1.2.2.12: #110496# Fixed a nasty update bug (hidden sprites where not cleared, when not part of other update areas by chance) 2004/08/20 00:27:10 thb 1.2.2.11: #110496# Added TODO comment 2004/08/06 14:00:09 thb 1.2.2.10: #110496# Adapted XSprite API to match reality (the way it was simply wasn't logical). Implemented sprite clipping 2004/08/02 17:50:59 thb 1.2.2.9: #110496# Adapted to recent XCanvas API changes, streamlined and factored out common code with directxcanvas 2004/07/22 20:38:27 thb 1.2.2.8: #110496# Adapted to setData/setPixel API change 2004/07/22 18:40:42 thb 1.2.2.7: #110496# Overhauled sprite redraw algo, to also respect overlapping sprites 2004/07/20 19:23:55 thb 1.2.2.6: #110496# Removed self-references to various interface implementations, along the lines, factored out common base implementation for all c++ canvases 2004/06/17 10:33:25 thb 1.2.2.5: #110496# Handle huge shrinks correctly for font scaling; added some more debug code 2004/05/27 20:51:24 thb 1.2.2.4: #110496# Added classification code to all TODO/HACK/FIXME comments. There are four categories: - code quality (C) - performance (P) - missing functionality (F) - and missing/incomplete error handling (E) Furthermore, every category has a severity number between 1 and 3 associated, where 1 is lowest and 3 highest severity 2004/05/27 14:36:52 thb 1.2.2.3: #110496# verbose tracing is now guarded also with DBG_UTIL. Unified verbose trace output between directx and VCL canvas 2004/04/12 15:12:24 thb 1.2.2.2: #110496# Adaptions after canvas01 merge 2004/04/05 15:57:57 thb 1.2.2.1: Resync with canvas01 changes
2004-11-26 16:11:13 +00:00
#include <rtl/math.hxx>
#include <vcl/outdev.hxx>
#include <vcl/bitmap.hxx>
INTEGRATION: CWS presentationengine01 (1.2.2); FILE MERGED 2004/11/17 17:00:28 thb 1.2.2.20: #118514# Canvas module reorg 2004/10/26 23:36:58 thb 1.2.2.19: #110496# Added dedicated alpha bitmap support: factory methods at the XGraphicDevice, and optimized handling internally 2004/10/25 19:07:44 thb 1.2.2.18: #i20518# Improved canvas performance for sprite rendering 2004/10/11 00:00:05 thb 1.2.2.17: #i34997# Added new method XCanvas::drawBitmapModulated(), to facilitate global alpha channel changes when rendering bitmaps 2004/09/09 14:44:31 thb 1.2.2.16: #110496# Fixed minor map file issues; changed order of canvas instantiations in canvas factory; added sprite clipping to DirectX canvas 2004/09/06 13:33:45 thb 1.2.2.15: #110496# Improved documentation 2004/09/01 10:50:36 thb 1.2.2.14: #110496# Optimized sprite repaint (for static sprite content) 2004/08/27 18:46:16 thb 1.2.2.13: #110496# Adapted to recent canvas API changes (XSpriteCanvas::updateScreen and sprite clip semantics 2004/08/26 12:23:40 thb 1.2.2.12: #110496# Fixed a nasty update bug (hidden sprites where not cleared, when not part of other update areas by chance) 2004/08/20 00:27:10 thb 1.2.2.11: #110496# Added TODO comment 2004/08/06 14:00:09 thb 1.2.2.10: #110496# Adapted XSprite API to match reality (the way it was simply wasn't logical). Implemented sprite clipping 2004/08/02 17:50:59 thb 1.2.2.9: #110496# Adapted to recent XCanvas API changes, streamlined and factored out common code with directxcanvas 2004/07/22 20:38:27 thb 1.2.2.8: #110496# Adapted to setData/setPixel API change 2004/07/22 18:40:42 thb 1.2.2.7: #110496# Overhauled sprite redraw algo, to also respect overlapping sprites 2004/07/20 19:23:55 thb 1.2.2.6: #110496# Removed self-references to various interface implementations, along the lines, factored out common base implementation for all c++ canvases 2004/06/17 10:33:25 thb 1.2.2.5: #110496# Handle huge shrinks correctly for font scaling; added some more debug code 2004/05/27 20:51:24 thb 1.2.2.4: #110496# Added classification code to all TODO/HACK/FIXME comments. There are four categories: - code quality (C) - performance (P) - missing functionality (F) - and missing/incomplete error handling (E) Furthermore, every category has a severity number between 1 and 3 associated, where 1 is lowest and 3 highest severity 2004/05/27 14:36:52 thb 1.2.2.3: #110496# verbose tracing is now guarded also with DBG_UTIL. Unified verbose trace output between directx and VCL canvas 2004/04/12 15:12:24 thb 1.2.2.2: #110496# Adaptions after canvas01 merge 2004/04/05 15:57:57 thb 1.2.2.1: Resync with canvas01 changes
2004-11-26 16:11:13 +00:00
#include <vcl/alpha.hxx>
#include <vcl/bitmapex.hxx>
#include <vcl/canvastools.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/tools/canvastools.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
INTEGRATION: CWS presentationengine01 (1.2.2); FILE MERGED 2004/11/17 17:00:28 thb 1.2.2.20: #118514# Canvas module reorg 2004/10/26 23:36:58 thb 1.2.2.19: #110496# Added dedicated alpha bitmap support: factory methods at the XGraphicDevice, and optimized handling internally 2004/10/25 19:07:44 thb 1.2.2.18: #i20518# Improved canvas performance for sprite rendering 2004/10/11 00:00:05 thb 1.2.2.17: #i34997# Added new method XCanvas::drawBitmapModulated(), to facilitate global alpha channel changes when rendering bitmaps 2004/09/09 14:44:31 thb 1.2.2.16: #110496# Fixed minor map file issues; changed order of canvas instantiations in canvas factory; added sprite clipping to DirectX canvas 2004/09/06 13:33:45 thb 1.2.2.15: #110496# Improved documentation 2004/09/01 10:50:36 thb 1.2.2.14: #110496# Optimized sprite repaint (for static sprite content) 2004/08/27 18:46:16 thb 1.2.2.13: #110496# Adapted to recent canvas API changes (XSpriteCanvas::updateScreen and sprite clip semantics 2004/08/26 12:23:40 thb 1.2.2.12: #110496# Fixed a nasty update bug (hidden sprites where not cleared, when not part of other update areas by chance) 2004/08/20 00:27:10 thb 1.2.2.11: #110496# Added TODO comment 2004/08/06 14:00:09 thb 1.2.2.10: #110496# Adapted XSprite API to match reality (the way it was simply wasn't logical). Implemented sprite clipping 2004/08/02 17:50:59 thb 1.2.2.9: #110496# Adapted to recent XCanvas API changes, streamlined and factored out common code with directxcanvas 2004/07/22 20:38:27 thb 1.2.2.8: #110496# Adapted to setData/setPixel API change 2004/07/22 18:40:42 thb 1.2.2.7: #110496# Overhauled sprite redraw algo, to also respect overlapping sprites 2004/07/20 19:23:55 thb 1.2.2.6: #110496# Removed self-references to various interface implementations, along the lines, factored out common base implementation for all c++ canvases 2004/06/17 10:33:25 thb 1.2.2.5: #110496# Handle huge shrinks correctly for font scaling; added some more debug code 2004/05/27 20:51:24 thb 1.2.2.4: #110496# Added classification code to all TODO/HACK/FIXME comments. There are four categories: - code quality (C) - performance (P) - missing functionality (F) - and missing/incomplete error handling (E) Furthermore, every category has a severity number between 1 and 3 associated, where 1 is lowest and 3 highest severity 2004/05/27 14:36:52 thb 1.2.2.3: #110496# verbose tracing is now guarded also with DBG_UTIL. Unified verbose trace output between directx and VCL canvas 2004/04/12 15:12:24 thb 1.2.2.2: #110496# Adaptions after canvas01 merge 2004/04/05 15:57:57 thb 1.2.2.1: Resync with canvas01 changes
2004-11-26 16:11:13 +00:00
#include <basegfx/numeric/ftools.hxx>
#include <canvas/canvastools.hxx>
#include "canvascustomsprite.hxx"
using namespace ::com::sun::star;
INTEGRATION: CWS presentationengine01 (1.2.2); FILE MERGED 2004/11/17 17:00:28 thb 1.2.2.20: #118514# Canvas module reorg 2004/10/26 23:36:58 thb 1.2.2.19: #110496# Added dedicated alpha bitmap support: factory methods at the XGraphicDevice, and optimized handling internally 2004/10/25 19:07:44 thb 1.2.2.18: #i20518# Improved canvas performance for sprite rendering 2004/10/11 00:00:05 thb 1.2.2.17: #i34997# Added new method XCanvas::drawBitmapModulated(), to facilitate global alpha channel changes when rendering bitmaps 2004/09/09 14:44:31 thb 1.2.2.16: #110496# Fixed minor map file issues; changed order of canvas instantiations in canvas factory; added sprite clipping to DirectX canvas 2004/09/06 13:33:45 thb 1.2.2.15: #110496# Improved documentation 2004/09/01 10:50:36 thb 1.2.2.14: #110496# Optimized sprite repaint (for static sprite content) 2004/08/27 18:46:16 thb 1.2.2.13: #110496# Adapted to recent canvas API changes (XSpriteCanvas::updateScreen and sprite clip semantics 2004/08/26 12:23:40 thb 1.2.2.12: #110496# Fixed a nasty update bug (hidden sprites where not cleared, when not part of other update areas by chance) 2004/08/20 00:27:10 thb 1.2.2.11: #110496# Added TODO comment 2004/08/06 14:00:09 thb 1.2.2.10: #110496# Adapted XSprite API to match reality (the way it was simply wasn't logical). Implemented sprite clipping 2004/08/02 17:50:59 thb 1.2.2.9: #110496# Adapted to recent XCanvas API changes, streamlined and factored out common code with directxcanvas 2004/07/22 20:38:27 thb 1.2.2.8: #110496# Adapted to setData/setPixel API change 2004/07/22 18:40:42 thb 1.2.2.7: #110496# Overhauled sprite redraw algo, to also respect overlapping sprites 2004/07/20 19:23:55 thb 1.2.2.6: #110496# Removed self-references to various interface implementations, along the lines, factored out common base implementation for all c++ canvases 2004/06/17 10:33:25 thb 1.2.2.5: #110496# Handle huge shrinks correctly for font scaling; added some more debug code 2004/05/27 20:51:24 thb 1.2.2.4: #110496# Added classification code to all TODO/HACK/FIXME comments. There are four categories: - code quality (C) - performance (P) - missing functionality (F) - and missing/incomplete error handling (E) Furthermore, every category has a severity number between 1 and 3 associated, where 1 is lowest and 3 highest severity 2004/05/27 14:36:52 thb 1.2.2.3: #110496# verbose tracing is now guarded also with DBG_UTIL. Unified verbose trace output between directx and VCL canvas 2004/04/12 15:12:24 thb 1.2.2.2: #110496# Adaptions after canvas01 merge 2004/04/05 15:57:57 thb 1.2.2.1: Resync with canvas01 changes
2004-11-26 16:11:13 +00:00
namespace vclcanvas
{
CanvasCustomSprite::CanvasCustomSprite( const geometry::RealSize2D& rSpriteSize,
rendering::XGraphicDevice& rDevice,
const ::canvas::SpriteSurface::Reference& rOwningSpriteCanvas,
const OutDevProviderSharedPtr& rOutDevProvider,
bool bShowSpriteBounds )
{
ENSURE_OR_THROW( rOwningSpriteCanvas.get() &&
rOutDevProvider,
"CanvasCustomSprite::CanvasCustomSprite(): Invalid sprite canvas" );
INTEGRATION: CWS presentationengine01 (1.2.2); FILE MERGED 2004/11/17 17:00:28 thb 1.2.2.20: #118514# Canvas module reorg 2004/10/26 23:36:58 thb 1.2.2.19: #110496# Added dedicated alpha bitmap support: factory methods at the XGraphicDevice, and optimized handling internally 2004/10/25 19:07:44 thb 1.2.2.18: #i20518# Improved canvas performance for sprite rendering 2004/10/11 00:00:05 thb 1.2.2.17: #i34997# Added new method XCanvas::drawBitmapModulated(), to facilitate global alpha channel changes when rendering bitmaps 2004/09/09 14:44:31 thb 1.2.2.16: #110496# Fixed minor map file issues; changed order of canvas instantiations in canvas factory; added sprite clipping to DirectX canvas 2004/09/06 13:33:45 thb 1.2.2.15: #110496# Improved documentation 2004/09/01 10:50:36 thb 1.2.2.14: #110496# Optimized sprite repaint (for static sprite content) 2004/08/27 18:46:16 thb 1.2.2.13: #110496# Adapted to recent canvas API changes (XSpriteCanvas::updateScreen and sprite clip semantics 2004/08/26 12:23:40 thb 1.2.2.12: #110496# Fixed a nasty update bug (hidden sprites where not cleared, when not part of other update areas by chance) 2004/08/20 00:27:10 thb 1.2.2.11: #110496# Added TODO comment 2004/08/06 14:00:09 thb 1.2.2.10: #110496# Adapted XSprite API to match reality (the way it was simply wasn't logical). Implemented sprite clipping 2004/08/02 17:50:59 thb 1.2.2.9: #110496# Adapted to recent XCanvas API changes, streamlined and factored out common code with directxcanvas 2004/07/22 20:38:27 thb 1.2.2.8: #110496# Adapted to setData/setPixel API change 2004/07/22 18:40:42 thb 1.2.2.7: #110496# Overhauled sprite redraw algo, to also respect overlapping sprites 2004/07/20 19:23:55 thb 1.2.2.6: #110496# Removed self-references to various interface implementations, along the lines, factored out common base implementation for all c++ canvases 2004/06/17 10:33:25 thb 1.2.2.5: #110496# Handle huge shrinks correctly for font scaling; added some more debug code 2004/05/27 20:51:24 thb 1.2.2.4: #110496# Added classification code to all TODO/HACK/FIXME comments. There are four categories: - code quality (C) - performance (P) - missing functionality (F) - and missing/incomplete error handling (E) Furthermore, every category has a severity number between 1 and 3 associated, where 1 is lowest and 3 highest severity 2004/05/27 14:36:52 thb 1.2.2.3: #110496# verbose tracing is now guarded also with DBG_UTIL. Unified verbose trace output between directx and VCL canvas 2004/04/12 15:12:24 thb 1.2.2.2: #110496# Adaptions after canvas01 merge 2004/04/05 15:57:57 thb 1.2.2.1: Resync with canvas01 changes
2004-11-26 16:11:13 +00:00
// setup back buffer
2005-11-02 11:59:14 +00:00
const ::Size aSize(
static_cast<sal_Int32>( ::std::max( 1.0,
ceil( rSpriteSize.Width ))), // round up to nearest int,
// enforce sprite to have at
// least (1,1) pixel size
static_cast<sal_Int32>( ::std::max( 1.0,
ceil( rSpriteSize.Height ))) );
INTEGRATION: CWS presentationengine01 (1.2.2); FILE MERGED 2004/11/17 17:00:28 thb 1.2.2.20: #118514# Canvas module reorg 2004/10/26 23:36:58 thb 1.2.2.19: #110496# Added dedicated alpha bitmap support: factory methods at the XGraphicDevice, and optimized handling internally 2004/10/25 19:07:44 thb 1.2.2.18: #i20518# Improved canvas performance for sprite rendering 2004/10/11 00:00:05 thb 1.2.2.17: #i34997# Added new method XCanvas::drawBitmapModulated(), to facilitate global alpha channel changes when rendering bitmaps 2004/09/09 14:44:31 thb 1.2.2.16: #110496# Fixed minor map file issues; changed order of canvas instantiations in canvas factory; added sprite clipping to DirectX canvas 2004/09/06 13:33:45 thb 1.2.2.15: #110496# Improved documentation 2004/09/01 10:50:36 thb 1.2.2.14: #110496# Optimized sprite repaint (for static sprite content) 2004/08/27 18:46:16 thb 1.2.2.13: #110496# Adapted to recent canvas API changes (XSpriteCanvas::updateScreen and sprite clip semantics 2004/08/26 12:23:40 thb 1.2.2.12: #110496# Fixed a nasty update bug (hidden sprites where not cleared, when not part of other update areas by chance) 2004/08/20 00:27:10 thb 1.2.2.11: #110496# Added TODO comment 2004/08/06 14:00:09 thb 1.2.2.10: #110496# Adapted XSprite API to match reality (the way it was simply wasn't logical). Implemented sprite clipping 2004/08/02 17:50:59 thb 1.2.2.9: #110496# Adapted to recent XCanvas API changes, streamlined and factored out common code with directxcanvas 2004/07/22 20:38:27 thb 1.2.2.8: #110496# Adapted to setData/setPixel API change 2004/07/22 18:40:42 thb 1.2.2.7: #110496# Overhauled sprite redraw algo, to also respect overlapping sprites 2004/07/20 19:23:55 thb 1.2.2.6: #110496# Removed self-references to various interface implementations, along the lines, factored out common base implementation for all c++ canvases 2004/06/17 10:33:25 thb 1.2.2.5: #110496# Handle huge shrinks correctly for font scaling; added some more debug code 2004/05/27 20:51:24 thb 1.2.2.4: #110496# Added classification code to all TODO/HACK/FIXME comments. There are four categories: - code quality (C) - performance (P) - missing functionality (F) - and missing/incomplete error handling (E) Furthermore, every category has a severity number between 1 and 3 associated, where 1 is lowest and 3 highest severity 2004/05/27 14:36:52 thb 1.2.2.3: #110496# verbose tracing is now guarded also with DBG_UTIL. Unified verbose trace output between directx and VCL canvas 2004/04/12 15:12:24 thb 1.2.2.2: #110496# Adaptions after canvas01 merge 2004/04/05 15:57:57 thb 1.2.2.1: Resync with canvas01 changes
2004-11-26 16:11:13 +00:00
// create content backbuffer in screen depth
BackBufferSharedPtr pBackBuffer( new BackBuffer( rOutDevProvider->getOutDev() ) );
2005-11-02 11:59:14 +00:00
pBackBuffer->setSize( aSize );
INTEGRATION: CWS presentationengine01 (1.2.2); FILE MERGED 2004/11/17 17:00:28 thb 1.2.2.20: #118514# Canvas module reorg 2004/10/26 23:36:58 thb 1.2.2.19: #110496# Added dedicated alpha bitmap support: factory methods at the XGraphicDevice, and optimized handling internally 2004/10/25 19:07:44 thb 1.2.2.18: #i20518# Improved canvas performance for sprite rendering 2004/10/11 00:00:05 thb 1.2.2.17: #i34997# Added new method XCanvas::drawBitmapModulated(), to facilitate global alpha channel changes when rendering bitmaps 2004/09/09 14:44:31 thb 1.2.2.16: #110496# Fixed minor map file issues; changed order of canvas instantiations in canvas factory; added sprite clipping to DirectX canvas 2004/09/06 13:33:45 thb 1.2.2.15: #110496# Improved documentation 2004/09/01 10:50:36 thb 1.2.2.14: #110496# Optimized sprite repaint (for static sprite content) 2004/08/27 18:46:16 thb 1.2.2.13: #110496# Adapted to recent canvas API changes (XSpriteCanvas::updateScreen and sprite clip semantics 2004/08/26 12:23:40 thb 1.2.2.12: #110496# Fixed a nasty update bug (hidden sprites where not cleared, when not part of other update areas by chance) 2004/08/20 00:27:10 thb 1.2.2.11: #110496# Added TODO comment 2004/08/06 14:00:09 thb 1.2.2.10: #110496# Adapted XSprite API to match reality (the way it was simply wasn't logical). Implemented sprite clipping 2004/08/02 17:50:59 thb 1.2.2.9: #110496# Adapted to recent XCanvas API changes, streamlined and factored out common code with directxcanvas 2004/07/22 20:38:27 thb 1.2.2.8: #110496# Adapted to setData/setPixel API change 2004/07/22 18:40:42 thb 1.2.2.7: #110496# Overhauled sprite redraw algo, to also respect overlapping sprites 2004/07/20 19:23:55 thb 1.2.2.6: #110496# Removed self-references to various interface implementations, along the lines, factored out common base implementation for all c++ canvases 2004/06/17 10:33:25 thb 1.2.2.5: #110496# Handle huge shrinks correctly for font scaling; added some more debug code 2004/05/27 20:51:24 thb 1.2.2.4: #110496# Added classification code to all TODO/HACK/FIXME comments. There are four categories: - code quality (C) - performance (P) - missing functionality (F) - and missing/incomplete error handling (E) Furthermore, every category has a severity number between 1 and 3 associated, where 1 is lowest and 3 highest severity 2004/05/27 14:36:52 thb 1.2.2.3: #110496# verbose tracing is now guarded also with DBG_UTIL. Unified verbose trace output between directx and VCL canvas 2004/04/12 15:12:24 thb 1.2.2.2: #110496# Adaptions after canvas01 merge 2004/04/05 15:57:57 thb 1.2.2.1: Resync with canvas01 changes
2004-11-26 16:11:13 +00:00
// create mask backbuffer, with one bit color depth
BackBufferSharedPtr pBackBufferMask( new BackBuffer( rOutDevProvider->getOutDev(),
2005-11-02 11:59:14 +00:00
true ) );
pBackBufferMask->setSize( aSize );
INTEGRATION: CWS presentationengine01 (1.2.2); FILE MERGED 2004/11/17 17:00:28 thb 1.2.2.20: #118514# Canvas module reorg 2004/10/26 23:36:58 thb 1.2.2.19: #110496# Added dedicated alpha bitmap support: factory methods at the XGraphicDevice, and optimized handling internally 2004/10/25 19:07:44 thb 1.2.2.18: #i20518# Improved canvas performance for sprite rendering 2004/10/11 00:00:05 thb 1.2.2.17: #i34997# Added new method XCanvas::drawBitmapModulated(), to facilitate global alpha channel changes when rendering bitmaps 2004/09/09 14:44:31 thb 1.2.2.16: #110496# Fixed minor map file issues; changed order of canvas instantiations in canvas factory; added sprite clipping to DirectX canvas 2004/09/06 13:33:45 thb 1.2.2.15: #110496# Improved documentation 2004/09/01 10:50:36 thb 1.2.2.14: #110496# Optimized sprite repaint (for static sprite content) 2004/08/27 18:46:16 thb 1.2.2.13: #110496# Adapted to recent canvas API changes (XSpriteCanvas::updateScreen and sprite clip semantics 2004/08/26 12:23:40 thb 1.2.2.12: #110496# Fixed a nasty update bug (hidden sprites where not cleared, when not part of other update areas by chance) 2004/08/20 00:27:10 thb 1.2.2.11: #110496# Added TODO comment 2004/08/06 14:00:09 thb 1.2.2.10: #110496# Adapted XSprite API to match reality (the way it was simply wasn't logical). Implemented sprite clipping 2004/08/02 17:50:59 thb 1.2.2.9: #110496# Adapted to recent XCanvas API changes, streamlined and factored out common code with directxcanvas 2004/07/22 20:38:27 thb 1.2.2.8: #110496# Adapted to setData/setPixel API change 2004/07/22 18:40:42 thb 1.2.2.7: #110496# Overhauled sprite redraw algo, to also respect overlapping sprites 2004/07/20 19:23:55 thb 1.2.2.6: #110496# Removed self-references to various interface implementations, along the lines, factored out common base implementation for all c++ canvases 2004/06/17 10:33:25 thb 1.2.2.5: #110496# Handle huge shrinks correctly for font scaling; added some more debug code 2004/05/27 20:51:24 thb 1.2.2.4: #110496# Added classification code to all TODO/HACK/FIXME comments. There are four categories: - code quality (C) - performance (P) - missing functionality (F) - and missing/incomplete error handling (E) Furthermore, every category has a severity number between 1 and 3 associated, where 1 is lowest and 3 highest severity 2004/05/27 14:36:52 thb 1.2.2.3: #110496# verbose tracing is now guarded also with DBG_UTIL. Unified verbose trace output between directx and VCL canvas 2004/04/12 15:12:24 thb 1.2.2.2: #110496# Adaptions after canvas01 merge 2004/04/05 15:57:57 thb 1.2.2.1: Resync with canvas01 changes
2004-11-26 16:11:13 +00:00
// TODO(F1): Implement alpha vdev (could prolly enable
// antialiasing again, then)
INTEGRATION: CWS presentationengine01 (1.2.2); FILE MERGED 2004/11/17 17:00:28 thb 1.2.2.20: #118514# Canvas module reorg 2004/10/26 23:36:58 thb 1.2.2.19: #110496# Added dedicated alpha bitmap support: factory methods at the XGraphicDevice, and optimized handling internally 2004/10/25 19:07:44 thb 1.2.2.18: #i20518# Improved canvas performance for sprite rendering 2004/10/11 00:00:05 thb 1.2.2.17: #i34997# Added new method XCanvas::drawBitmapModulated(), to facilitate global alpha channel changes when rendering bitmaps 2004/09/09 14:44:31 thb 1.2.2.16: #110496# Fixed minor map file issues; changed order of canvas instantiations in canvas factory; added sprite clipping to DirectX canvas 2004/09/06 13:33:45 thb 1.2.2.15: #110496# Improved documentation 2004/09/01 10:50:36 thb 1.2.2.14: #110496# Optimized sprite repaint (for static sprite content) 2004/08/27 18:46:16 thb 1.2.2.13: #110496# Adapted to recent canvas API changes (XSpriteCanvas::updateScreen and sprite clip semantics 2004/08/26 12:23:40 thb 1.2.2.12: #110496# Fixed a nasty update bug (hidden sprites where not cleared, when not part of other update areas by chance) 2004/08/20 00:27:10 thb 1.2.2.11: #110496# Added TODO comment 2004/08/06 14:00:09 thb 1.2.2.10: #110496# Adapted XSprite API to match reality (the way it was simply wasn't logical). Implemented sprite clipping 2004/08/02 17:50:59 thb 1.2.2.9: #110496# Adapted to recent XCanvas API changes, streamlined and factored out common code with directxcanvas 2004/07/22 20:38:27 thb 1.2.2.8: #110496# Adapted to setData/setPixel API change 2004/07/22 18:40:42 thb 1.2.2.7: #110496# Overhauled sprite redraw algo, to also respect overlapping sprites 2004/07/20 19:23:55 thb 1.2.2.6: #110496# Removed self-references to various interface implementations, along the lines, factored out common base implementation for all c++ canvases 2004/06/17 10:33:25 thb 1.2.2.5: #110496# Handle huge shrinks correctly for font scaling; added some more debug code 2004/05/27 20:51:24 thb 1.2.2.4: #110496# Added classification code to all TODO/HACK/FIXME comments. There are four categories: - code quality (C) - performance (P) - missing functionality (F) - and missing/incomplete error handling (E) Furthermore, every category has a severity number between 1 and 3 associated, where 1 is lowest and 3 highest severity 2004/05/27 14:36:52 thb 1.2.2.3: #110496# verbose tracing is now guarded also with DBG_UTIL. Unified verbose trace output between directx and VCL canvas 2004/04/12 15:12:24 thb 1.2.2.2: #110496# Adaptions after canvas01 merge 2004/04/05 15:57:57 thb 1.2.2.1: Resync with canvas01 changes
2004-11-26 16:11:13 +00:00
// disable font antialiasing (causes ugly shadows otherwise)
pBackBuffer->getOutDev().SetAntialiasing( ANTIALIASING_DISABLE_TEXT );
pBackBufferMask->getOutDev().SetAntialiasing( ANTIALIASING_DISABLE_TEXT );
INTEGRATION: CWS presentationengine01 (1.2.2); FILE MERGED 2004/11/17 17:00:28 thb 1.2.2.20: #118514# Canvas module reorg 2004/10/26 23:36:58 thb 1.2.2.19: #110496# Added dedicated alpha bitmap support: factory methods at the XGraphicDevice, and optimized handling internally 2004/10/25 19:07:44 thb 1.2.2.18: #i20518# Improved canvas performance for sprite rendering 2004/10/11 00:00:05 thb 1.2.2.17: #i34997# Added new method XCanvas::drawBitmapModulated(), to facilitate global alpha channel changes when rendering bitmaps 2004/09/09 14:44:31 thb 1.2.2.16: #110496# Fixed minor map file issues; changed order of canvas instantiations in canvas factory; added sprite clipping to DirectX canvas 2004/09/06 13:33:45 thb 1.2.2.15: #110496# Improved documentation 2004/09/01 10:50:36 thb 1.2.2.14: #110496# Optimized sprite repaint (for static sprite content) 2004/08/27 18:46:16 thb 1.2.2.13: #110496# Adapted to recent canvas API changes (XSpriteCanvas::updateScreen and sprite clip semantics 2004/08/26 12:23:40 thb 1.2.2.12: #110496# Fixed a nasty update bug (hidden sprites where not cleared, when not part of other update areas by chance) 2004/08/20 00:27:10 thb 1.2.2.11: #110496# Added TODO comment 2004/08/06 14:00:09 thb 1.2.2.10: #110496# Adapted XSprite API to match reality (the way it was simply wasn't logical). Implemented sprite clipping 2004/08/02 17:50:59 thb 1.2.2.9: #110496# Adapted to recent XCanvas API changes, streamlined and factored out common code with directxcanvas 2004/07/22 20:38:27 thb 1.2.2.8: #110496# Adapted to setData/setPixel API change 2004/07/22 18:40:42 thb 1.2.2.7: #110496# Overhauled sprite redraw algo, to also respect overlapping sprites 2004/07/20 19:23:55 thb 1.2.2.6: #110496# Removed self-references to various interface implementations, along the lines, factored out common base implementation for all c++ canvases 2004/06/17 10:33:25 thb 1.2.2.5: #110496# Handle huge shrinks correctly for font scaling; added some more debug code 2004/05/27 20:51:24 thb 1.2.2.4: #110496# Added classification code to all TODO/HACK/FIXME comments. There are four categories: - code quality (C) - performance (P) - missing functionality (F) - and missing/incomplete error handling (E) Furthermore, every category has a severity number between 1 and 3 associated, where 1 is lowest and 3 highest severity 2004/05/27 14:36:52 thb 1.2.2.3: #110496# verbose tracing is now guarded also with DBG_UTIL. Unified verbose trace output between directx and VCL canvas 2004/04/12 15:12:24 thb 1.2.2.2: #110496# Adaptions after canvas01 merge 2004/04/05 15:57:57 thb 1.2.2.1: Resync with canvas01 changes
2004-11-26 16:11:13 +00:00
// set mask vdev drawmode, such that everything is painted
// black. That leaves us with a binary image, white for
// background, black for painted content
pBackBufferMask->getOutDev().SetDrawMode( DRAWMODE_BLACKLINE | DRAWMODE_BLACKFILL | DRAWMODE_BLACKTEXT |
2005-11-02 11:59:14 +00:00
DRAWMODE_BLACKGRADIENT | DRAWMODE_BLACKBITMAP );
INTEGRATION: CWS presentationengine01 (1.2.2); FILE MERGED 2004/11/17 17:00:28 thb 1.2.2.20: #118514# Canvas module reorg 2004/10/26 23:36:58 thb 1.2.2.19: #110496# Added dedicated alpha bitmap support: factory methods at the XGraphicDevice, and optimized handling internally 2004/10/25 19:07:44 thb 1.2.2.18: #i20518# Improved canvas performance for sprite rendering 2004/10/11 00:00:05 thb 1.2.2.17: #i34997# Added new method XCanvas::drawBitmapModulated(), to facilitate global alpha channel changes when rendering bitmaps 2004/09/09 14:44:31 thb 1.2.2.16: #110496# Fixed minor map file issues; changed order of canvas instantiations in canvas factory; added sprite clipping to DirectX canvas 2004/09/06 13:33:45 thb 1.2.2.15: #110496# Improved documentation 2004/09/01 10:50:36 thb 1.2.2.14: #110496# Optimized sprite repaint (for static sprite content) 2004/08/27 18:46:16 thb 1.2.2.13: #110496# Adapted to recent canvas API changes (XSpriteCanvas::updateScreen and sprite clip semantics 2004/08/26 12:23:40 thb 1.2.2.12: #110496# Fixed a nasty update bug (hidden sprites where not cleared, when not part of other update areas by chance) 2004/08/20 00:27:10 thb 1.2.2.11: #110496# Added TODO comment 2004/08/06 14:00:09 thb 1.2.2.10: #110496# Adapted XSprite API to match reality (the way it was simply wasn't logical). Implemented sprite clipping 2004/08/02 17:50:59 thb 1.2.2.9: #110496# Adapted to recent XCanvas API changes, streamlined and factored out common code with directxcanvas 2004/07/22 20:38:27 thb 1.2.2.8: #110496# Adapted to setData/setPixel API change 2004/07/22 18:40:42 thb 1.2.2.7: #110496# Overhauled sprite redraw algo, to also respect overlapping sprites 2004/07/20 19:23:55 thb 1.2.2.6: #110496# Removed self-references to various interface implementations, along the lines, factored out common base implementation for all c++ canvases 2004/06/17 10:33:25 thb 1.2.2.5: #110496# Handle huge shrinks correctly for font scaling; added some more debug code 2004/05/27 20:51:24 thb 1.2.2.4: #110496# Added classification code to all TODO/HACK/FIXME comments. There are four categories: - code quality (C) - performance (P) - missing functionality (F) - and missing/incomplete error handling (E) Furthermore, every category has a severity number between 1 and 3 associated, where 1 is lowest and 3 highest severity 2004/05/27 14:36:52 thb 1.2.2.3: #110496# verbose tracing is now guarded also with DBG_UTIL. Unified verbose trace output between directx and VCL canvas 2004/04/12 15:12:24 thb 1.2.2.2: #110496# Adaptions after canvas01 merge 2004/04/05 15:57:57 thb 1.2.2.1: Resync with canvas01 changes
2004-11-26 16:11:13 +00:00
// setup canvas helper
2005-11-02 11:59:14 +00:00
// always render into back buffer, don't preserve state (it's
// our private VDev, after all), have notion of alpha
maCanvasHelper.init( rDevice,
2005-11-02 11:59:14 +00:00
pBackBuffer,
false,
true );
maCanvasHelper.setBackgroundOutDev( pBackBufferMask );
2005-11-02 11:59:14 +00:00
// setup sprite helper
2005-11-02 11:59:14 +00:00
maSpriteHelper.init( rSpriteSize,
rOwningSpriteCanvas,
2005-11-02 11:59:14 +00:00
pBackBuffer,
pBackBufferMask,
bShowSpriteBounds );
// clear sprite to 100% transparent
maCanvasHelper.clear();
}
OUString SAL_CALL CanvasCustomSprite::getImplementationName() throw( uno::RuntimeException, std::exception )
{
return OUString( "VCLCanvas.CanvasCustomSprite" );
}
sal_Bool SAL_CALL CanvasCustomSprite::supportsService( const OUString& ServiceName ) throw( uno::RuntimeException, std::exception )
{
return cppu::supportsService( this, ServiceName );
}
uno::Sequence< OUString > SAL_CALL CanvasCustomSprite::getSupportedServiceNames() throw( uno::RuntimeException, std::exception )
{
uno::Sequence< OUString > aRet(1);
aRet[0] = "com.sun.star.rendering.CanvasCustomSprite";
return aRet;
}
// Sprite
2005-11-02 11:59:14 +00:00
void CanvasCustomSprite::redraw( OutputDevice& rOutDev,
bool bBufferedUpdate ) const
{
SolarMutexGuard aGuard;
INTEGRATION: CWS presentationengine01 (1.2.2); FILE MERGED 2004/11/17 17:00:28 thb 1.2.2.20: #118514# Canvas module reorg 2004/10/26 23:36:58 thb 1.2.2.19: #110496# Added dedicated alpha bitmap support: factory methods at the XGraphicDevice, and optimized handling internally 2004/10/25 19:07:44 thb 1.2.2.18: #i20518# Improved canvas performance for sprite rendering 2004/10/11 00:00:05 thb 1.2.2.17: #i34997# Added new method XCanvas::drawBitmapModulated(), to facilitate global alpha channel changes when rendering bitmaps 2004/09/09 14:44:31 thb 1.2.2.16: #110496# Fixed minor map file issues; changed order of canvas instantiations in canvas factory; added sprite clipping to DirectX canvas 2004/09/06 13:33:45 thb 1.2.2.15: #110496# Improved documentation 2004/09/01 10:50:36 thb 1.2.2.14: #110496# Optimized sprite repaint (for static sprite content) 2004/08/27 18:46:16 thb 1.2.2.13: #110496# Adapted to recent canvas API changes (XSpriteCanvas::updateScreen and sprite clip semantics 2004/08/26 12:23:40 thb 1.2.2.12: #110496# Fixed a nasty update bug (hidden sprites where not cleared, when not part of other update areas by chance) 2004/08/20 00:27:10 thb 1.2.2.11: #110496# Added TODO comment 2004/08/06 14:00:09 thb 1.2.2.10: #110496# Adapted XSprite API to match reality (the way it was simply wasn't logical). Implemented sprite clipping 2004/08/02 17:50:59 thb 1.2.2.9: #110496# Adapted to recent XCanvas API changes, streamlined and factored out common code with directxcanvas 2004/07/22 20:38:27 thb 1.2.2.8: #110496# Adapted to setData/setPixel API change 2004/07/22 18:40:42 thb 1.2.2.7: #110496# Overhauled sprite redraw algo, to also respect overlapping sprites 2004/07/20 19:23:55 thb 1.2.2.6: #110496# Removed self-references to various interface implementations, along the lines, factored out common base implementation for all c++ canvases 2004/06/17 10:33:25 thb 1.2.2.5: #110496# Handle huge shrinks correctly for font scaling; added some more debug code 2004/05/27 20:51:24 thb 1.2.2.4: #110496# Added classification code to all TODO/HACK/FIXME comments. There are four categories: - code quality (C) - performance (P) - missing functionality (F) - and missing/incomplete error handling (E) Furthermore, every category has a severity number between 1 and 3 associated, where 1 is lowest and 3 highest severity 2004/05/27 14:36:52 thb 1.2.2.3: #110496# verbose tracing is now guarded also with DBG_UTIL. Unified verbose trace output between directx and VCL canvas 2004/04/12 15:12:24 thb 1.2.2.2: #110496# Adaptions after canvas01 merge 2004/04/05 15:57:57 thb 1.2.2.1: Resync with canvas01 changes
2004-11-26 16:11:13 +00:00
2005-11-02 11:59:14 +00:00
redraw( rOutDev, maSpriteHelper.getPosPixel(), bBufferedUpdate );
}
2005-11-02 11:59:14 +00:00
void CanvasCustomSprite::redraw( OutputDevice& rOutDev,
const ::basegfx::B2DPoint& rOrigOutputPos,
bool bBufferedUpdate ) const
{
SolarMutexGuard aGuard;
INTEGRATION: CWS presentationengine01 (1.2.2); FILE MERGED 2004/11/17 17:00:28 thb 1.2.2.20: #118514# Canvas module reorg 2004/10/26 23:36:58 thb 1.2.2.19: #110496# Added dedicated alpha bitmap support: factory methods at the XGraphicDevice, and optimized handling internally 2004/10/25 19:07:44 thb 1.2.2.18: #i20518# Improved canvas performance for sprite rendering 2004/10/11 00:00:05 thb 1.2.2.17: #i34997# Added new method XCanvas::drawBitmapModulated(), to facilitate global alpha channel changes when rendering bitmaps 2004/09/09 14:44:31 thb 1.2.2.16: #110496# Fixed minor map file issues; changed order of canvas instantiations in canvas factory; added sprite clipping to DirectX canvas 2004/09/06 13:33:45 thb 1.2.2.15: #110496# Improved documentation 2004/09/01 10:50:36 thb 1.2.2.14: #110496# Optimized sprite repaint (for static sprite content) 2004/08/27 18:46:16 thb 1.2.2.13: #110496# Adapted to recent canvas API changes (XSpriteCanvas::updateScreen and sprite clip semantics 2004/08/26 12:23:40 thb 1.2.2.12: #110496# Fixed a nasty update bug (hidden sprites where not cleared, when not part of other update areas by chance) 2004/08/20 00:27:10 thb 1.2.2.11: #110496# Added TODO comment 2004/08/06 14:00:09 thb 1.2.2.10: #110496# Adapted XSprite API to match reality (the way it was simply wasn't logical). Implemented sprite clipping 2004/08/02 17:50:59 thb 1.2.2.9: #110496# Adapted to recent XCanvas API changes, streamlined and factored out common code with directxcanvas 2004/07/22 20:38:27 thb 1.2.2.8: #110496# Adapted to setData/setPixel API change 2004/07/22 18:40:42 thb 1.2.2.7: #110496# Overhauled sprite redraw algo, to also respect overlapping sprites 2004/07/20 19:23:55 thb 1.2.2.6: #110496# Removed self-references to various interface implementations, along the lines, factored out common base implementation for all c++ canvases 2004/06/17 10:33:25 thb 1.2.2.5: #110496# Handle huge shrinks correctly for font scaling; added some more debug code 2004/05/27 20:51:24 thb 1.2.2.4: #110496# Added classification code to all TODO/HACK/FIXME comments. There are four categories: - code quality (C) - performance (P) - missing functionality (F) - and missing/incomplete error handling (E) Furthermore, every category has a severity number between 1 and 3 associated, where 1 is lowest and 3 highest severity 2004/05/27 14:36:52 thb 1.2.2.3: #110496# verbose tracing is now guarded also with DBG_UTIL. Unified verbose trace output between directx and VCL canvas 2004/04/12 15:12:24 thb 1.2.2.2: #110496# Adaptions after canvas01 merge 2004/04/05 15:57:57 thb 1.2.2.1: Resync with canvas01 changes
2004-11-26 16:11:13 +00:00
2005-11-02 11:59:14 +00:00
maSpriteHelper.redraw( rOutDev,
rOrigOutputPos,
mbSurfaceDirty,
bBufferedUpdate );
INTEGRATION: CWS presentationengine01 (1.2.2); FILE MERGED 2004/11/17 17:00:28 thb 1.2.2.20: #118514# Canvas module reorg 2004/10/26 23:36:58 thb 1.2.2.19: #110496# Added dedicated alpha bitmap support: factory methods at the XGraphicDevice, and optimized handling internally 2004/10/25 19:07:44 thb 1.2.2.18: #i20518# Improved canvas performance for sprite rendering 2004/10/11 00:00:05 thb 1.2.2.17: #i34997# Added new method XCanvas::drawBitmapModulated(), to facilitate global alpha channel changes when rendering bitmaps 2004/09/09 14:44:31 thb 1.2.2.16: #110496# Fixed minor map file issues; changed order of canvas instantiations in canvas factory; added sprite clipping to DirectX canvas 2004/09/06 13:33:45 thb 1.2.2.15: #110496# Improved documentation 2004/09/01 10:50:36 thb 1.2.2.14: #110496# Optimized sprite repaint (for static sprite content) 2004/08/27 18:46:16 thb 1.2.2.13: #110496# Adapted to recent canvas API changes (XSpriteCanvas::updateScreen and sprite clip semantics 2004/08/26 12:23:40 thb 1.2.2.12: #110496# Fixed a nasty update bug (hidden sprites where not cleared, when not part of other update areas by chance) 2004/08/20 00:27:10 thb 1.2.2.11: #110496# Added TODO comment 2004/08/06 14:00:09 thb 1.2.2.10: #110496# Adapted XSprite API to match reality (the way it was simply wasn't logical). Implemented sprite clipping 2004/08/02 17:50:59 thb 1.2.2.9: #110496# Adapted to recent XCanvas API changes, streamlined and factored out common code with directxcanvas 2004/07/22 20:38:27 thb 1.2.2.8: #110496# Adapted to setData/setPixel API change 2004/07/22 18:40:42 thb 1.2.2.7: #110496# Overhauled sprite redraw algo, to also respect overlapping sprites 2004/07/20 19:23:55 thb 1.2.2.6: #110496# Removed self-references to various interface implementations, along the lines, factored out common base implementation for all c++ canvases 2004/06/17 10:33:25 thb 1.2.2.5: #110496# Handle huge shrinks correctly for font scaling; added some more debug code 2004/05/27 20:51:24 thb 1.2.2.4: #110496# Added classification code to all TODO/HACK/FIXME comments. There are four categories: - code quality (C) - performance (P) - missing functionality (F) - and missing/incomplete error handling (E) Furthermore, every category has a severity number between 1 and 3 associated, where 1 is lowest and 3 highest severity 2004/05/27 14:36:52 thb 1.2.2.3: #110496# verbose tracing is now guarded also with DBG_UTIL. Unified verbose trace output between directx and VCL canvas 2004/04/12 15:12:24 thb 1.2.2.2: #110496# Adaptions after canvas01 merge 2004/04/05 15:57:57 thb 1.2.2.1: Resync with canvas01 changes
2004-11-26 16:11:13 +00:00
2005-11-02 11:59:14 +00:00
mbSurfaceDirty = false;
INTEGRATION: CWS presentationengine01 (1.2.2); FILE MERGED 2004/11/17 17:00:28 thb 1.2.2.20: #118514# Canvas module reorg 2004/10/26 23:36:58 thb 1.2.2.19: #110496# Added dedicated alpha bitmap support: factory methods at the XGraphicDevice, and optimized handling internally 2004/10/25 19:07:44 thb 1.2.2.18: #i20518# Improved canvas performance for sprite rendering 2004/10/11 00:00:05 thb 1.2.2.17: #i34997# Added new method XCanvas::drawBitmapModulated(), to facilitate global alpha channel changes when rendering bitmaps 2004/09/09 14:44:31 thb 1.2.2.16: #110496# Fixed minor map file issues; changed order of canvas instantiations in canvas factory; added sprite clipping to DirectX canvas 2004/09/06 13:33:45 thb 1.2.2.15: #110496# Improved documentation 2004/09/01 10:50:36 thb 1.2.2.14: #110496# Optimized sprite repaint (for static sprite content) 2004/08/27 18:46:16 thb 1.2.2.13: #110496# Adapted to recent canvas API changes (XSpriteCanvas::updateScreen and sprite clip semantics 2004/08/26 12:23:40 thb 1.2.2.12: #110496# Fixed a nasty update bug (hidden sprites where not cleared, when not part of other update areas by chance) 2004/08/20 00:27:10 thb 1.2.2.11: #110496# Added TODO comment 2004/08/06 14:00:09 thb 1.2.2.10: #110496# Adapted XSprite API to match reality (the way it was simply wasn't logical). Implemented sprite clipping 2004/08/02 17:50:59 thb 1.2.2.9: #110496# Adapted to recent XCanvas API changes, streamlined and factored out common code with directxcanvas 2004/07/22 20:38:27 thb 1.2.2.8: #110496# Adapted to setData/setPixel API change 2004/07/22 18:40:42 thb 1.2.2.7: #110496# Overhauled sprite redraw algo, to also respect overlapping sprites 2004/07/20 19:23:55 thb 1.2.2.6: #110496# Removed self-references to various interface implementations, along the lines, factored out common base implementation for all c++ canvases 2004/06/17 10:33:25 thb 1.2.2.5: #110496# Handle huge shrinks correctly for font scaling; added some more debug code 2004/05/27 20:51:24 thb 1.2.2.4: #110496# Added classification code to all TODO/HACK/FIXME comments. There are four categories: - code quality (C) - performance (P) - missing functionality (F) - and missing/incomplete error handling (E) Furthermore, every category has a severity number between 1 and 3 associated, where 1 is lowest and 3 highest severity 2004/05/27 14:36:52 thb 1.2.2.3: #110496# verbose tracing is now guarded also with DBG_UTIL. Unified verbose trace output between directx and VCL canvas 2004/04/12 15:12:24 thb 1.2.2.2: #110496# Adaptions after canvas01 merge 2004/04/05 15:57:57 thb 1.2.2.1: Resync with canvas01 changes
2004-11-26 16:11:13 +00:00
}
bool CanvasCustomSprite::repaint( const GraphicObjectSharedPtr& rGrf,
const rendering::ViewState& viewState,
const rendering::RenderState& renderState,
const ::Point& rPt,
const ::Size& rSz,
const GraphicAttr& rAttr ) const
{
SolarMutexGuard aGuard;
mbSurfaceDirty = true;
return maCanvasHelper.repaint( rGrf, viewState, renderState, rPt, rSz, rAttr );
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */