Author: Carlos Lopez <[email protected]>
Date: Thu Jun 28 17:58:40 2012 +0200
etl::surface: Add new set_wh member to allow pass data, w, h, and pitch to the
surface.
---
ETL/ETL/_surface.h | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/ETL/ETL/_surface.h b/ETL/ETL/_surface.h
index 22fcac3..6407ac9 100644
--- a/ETL/ETL/_surface.h
+++ b/ETL/ETL/_surface.h
@@ -227,6 +227,19 @@ public:
zero_pos_=data_=(pointer)(new char[pitch_*h_]);
deletable_=true;
}
+
+ set_wh(typename size_type::value_type w, typename size_type::value_type
h, value_type* newdata, const typename size_type::value_type &pitch)
+ {
+ if(data_ && deletable_)
+ {
+ delete [] data_;
+ }
+ w_=w;
+ h_=h
+ zero_pos_=data_=newdata;
+ pitch_=pitch;
+ deletable_=false;
+ }
void
fill(value_type v, int x, int y, int w, int h)
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl