impgraph.cxx (9f63b866) impgraph.cxx (cb0a2370)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 663 unchanged lines hidden (view full) ---

672
673 return aAnimation;
674}
675
676// ------------------------------------------------------------------------
677
678const GDIMetaFile& ImpGraphic::ImplGetGDIMetaFile() const
679{
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 663 unchanged lines hidden (view full) ---

672
673 return aAnimation;
674}
675
676// ------------------------------------------------------------------------
677
678const GDIMetaFile& ImpGraphic::ImplGetGDIMetaFile() const
679{
680 return maMetaFile;
680 if(GRAPHIC_BITMAP == meType && !maMetaFile.GetActionCount())
681 {
682 // #119735#
683 // Use the local maMetaFile as container for a metafile-representation
684 // of the bitmap graphic. This will be done only once, thus be buffered.
685 // I checked all usages of maMetaFile, it is only used when type is not
686 // GRAPHIC_BITMAP. In operator= it will get copied, thus buffering will
687 // survive copying (change this if not wanted)
688 ImpGraphic* pThat = const_cast< ImpGraphic* >(this);
689
690 if(maSvgData.get() && !maEx)
691 {
692 // use maEx as local buffer for rendered svg
693 pThat->maEx = maSvgData->getReplacement();
694 }
695
696 VirtualDevice aVirDev;
697 const Size aSizePixel(maEx.GetSizePixel());
698
699 pThat->maMetaFile.Record(&aVirDev);
700
701 if(maEx.IsTransparent())
702 {
703 aVirDev.DrawBitmapEx(Point(), maEx);
704 }
705 else
706 {
707 aVirDev.DrawBitmap(Point(), maEx.GetBitmap());
708 }
709
710 pThat->maMetaFile.Stop();
711 pThat->maMetaFile.SetPrefSize(aSizePixel);
712 }
713
714 return maMetaFile;
681}
682
683// ------------------------------------------------------------------------
684
685Size ImpGraphic::ImplGetPrefSize() const
686{
687 Size aSize;
688

--- 1221 unchanged lines hidden ---
715}
716
717// ------------------------------------------------------------------------
718
719Size ImpGraphic::ImplGetPrefSize() const
720{
721 Size aSize;
722

--- 1221 unchanged lines hidden ---