X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=ETL%2Ftrunk%2FETL%2F_pen.h;h=096570aef873af17e016d845c33c636345b8346b;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=110cb6a5b055f7fa0224b13552c751c56303a913;hpb=36d01e1527fda602a9aed07d209eb34e6770bca8;p=synfig.git diff --git a/ETL/trunk/ETL/_pen.h b/ETL/trunk/ETL/_pen.h index 110cb6a..096570a 100644 --- a/ETL/trunk/ETL/_pen.h +++ b/ETL/trunk/ETL/_pen.h @@ -24,8 +24,8 @@ /* === S T A R T =========================================================== */ -#ifndef __ETL_PEN_H -#define __ETL_PEN_H +#ifndef __ETL__PEN_H +#define __ETL__PEN_H /* === H E A D E R S ======================================================= */ @@ -154,7 +154,7 @@ private: void subptr(int nbytes) { - data_ = (pointer)((char*)data_ + nbytes); + data_ = (pointer)((char*)data_ - nbytes); } public: @@ -214,9 +214,9 @@ public: const_reference get_value_clip_at(int x, int y)const { assert(data_); if(clipped(x,y))return value_type(); return ((pointer)(((char*)data_)+y*pitch_))[x]; } - value_type get_value_clip()const { assert(data_); if(clipped())return value_type(); return *data_; } + const value_type get_value_clip()const { assert(data_); if(clipped())return value_type(); return *data_; } - value_type get_pen_value()const { return value_; } + const value_type get_pen_value()const { return value_; } void put_hline(int l,const value_type &v) {for(;l>0;l--,inc_x())put_value(v);}