[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenonbeta/kcanvas/device
From:       Rob Buis <rwlbuis () xs4all ! nl>
Date:       2005-04-30 23:14:25
Message-ID: 20050430231425.A308E665 () office ! kde ! org
[Download RAW message or body]

CVS commit by buis: 


Also allow images as targets using special contexts.


  M +4 -2      KRenderingDevice.h   1.40
  M +13 -1     agg/KRenderingDeviceAgg.cc   1.68
  M +2 -0      agg/KRenderingDeviceAgg.h   1.36
  M +1 -1      agg/KRenderingPaintServerSolidAgg.cc   1.49


--- kdenonbeta/kcanvas/device/KRenderingDevice.h  #1.39:1.40
@@ -76,4 +76,6 @@ public:
         // Global rendering device context
         virtual KRenderingDeviceContext *context() const = 0;
+        virtual void setContext(KRenderingDeviceContext *) const = 0;
+        virtual KRenderingDeviceContext *makeCurrentContext(KCanvasImageBuffer *) const = 0;
         
         // Vector path creation

--- kdenonbeta/kcanvas/device/agg/KRenderingDeviceAgg.cc  #1.67:1.68
@@ -89,4 +89,16 @@ KRenderingDeviceContext *KRenderingDevic
 }
 
+void KRenderingDeviceAgg::setContext(KRenderingDeviceContext *context) const
+{
+        m_context = static_cast<KRenderingDeviceContextAgg *>(context);
+}
+
+KRenderingDeviceContext *KRenderingDeviceAgg::makeCurrentContext(KCanvasImageBuffer *image) const
+{
+        m_context = new KRenderingDeviceContextAgg();
+        m_context->setBuffer(image);
+        return m_context;
+}
+
 void KRenderingDeviceAgg::init(KCanvasTarget *target)
 {

--- kdenonbeta/kcanvas/device/agg/KRenderingDeviceAgg.h  #1.35:1.36
@@ -54,4 +54,6 @@ public:
 
         virtual KRenderingDeviceContext *context() const;
+        virtual void setContext(KRenderingDeviceContext *) const;
+        virtual KRenderingDeviceContext *makeCurrentContext(KCanvasImageBuffer *) const;
 
         // Vector path creation


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic