diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2007-09-15 16:37:27 +0000 |
|---|---|---|
| committer | joncruz <joncruz@users.sourceforge.net> | 2007-09-15 16:37:27 +0000 |
| commit | c13edab979886a7dc0a23e8bf8b5da77fb5676de (patch) | |
| tree | d0af3cb43043747680e49269441978694656e6f8 /src/extension/internal | |
| parent | avoid code duplication, i.e. use sp_item_snappoints in the object-snapper.cpp (diff) | |
| download | inkscape-c13edab979886a7dc0a23e8bf8b5da77fb5676de.tar.gz inkscape-c13edab979886a7dc0a23e8bf8b5da77fb5676de.zip | |
Refactoring SPColor to C++ and removing legacy CMYK implementation
(bzr r3753)
Diffstat (limited to 'src/extension/internal')
| -rw-r--r-- | src/extension/internal/emf-win32-inout.cpp | 10 | ||||
| -rw-r--r-- | src/extension/internal/odf.cpp | 6 |
2 files changed, 7 insertions, 9 deletions
diff --git a/src/extension/internal/emf-win32-inout.cpp b/src/extension/internal/emf-win32-inout.cpp index 59f538ab9..ecc12b23a 100644 --- a/src/extension/internal/emf-win32-inout.cpp +++ b/src/extension/internal/emf-win32-inout.cpp @@ -332,7 +332,7 @@ select_pen(PEMF_CALLBACK_DATA d, int index) r = SP_COLOR_U_TO_F( GetRValue(pEmr->lopn.lopnColor) ); g = SP_COLOR_U_TO_F( GetGValue(pEmr->lopn.lopnColor) ); b = SP_COLOR_U_TO_F( GetBValue(pEmr->lopn.lopnColor) ); - sp_color_set_rgb_float( &(d->style.stroke.value.color), r,g,b ); + d->style.stroke.value.color.set( r, g, b ); d->style.stroke_linejoin.computed = 1; @@ -420,7 +420,7 @@ select_extpen(PEMF_CALLBACK_DATA d, int index) g = SP_COLOR_U_TO_F( GetGValue(pEmr->elp.elpColor) ); b = SP_COLOR_U_TO_F( GetBValue(pEmr->elp.elpColor) ); - sp_color_set_rgb_float( &(d->style.stroke.value.color), r,g,b ); + d->style.stroke.value.color.( r, g, b ); d->stroke_set = true; } @@ -442,7 +442,7 @@ select_brush(PEMF_CALLBACK_DATA d, int index) r = SP_COLOR_U_TO_F( GetRValue(pEmr->lb.lbColor) ); g = SP_COLOR_U_TO_F( GetGValue(pEmr->lb.lbColor) ); b = SP_COLOR_U_TO_F( GetBValue(pEmr->lb.lbColor) ); - sp_color_set_rgb_float( &(d->style.fill.value.color), r,g,b ); + d->style.fill.value.color.( r, g, b ); } d->fill_set = true; @@ -803,7 +803,7 @@ myEnhMetaFileProc(HDC hDC, HANDLETABLE *lpHTable, ENHMETARECORD *lpEMFR, int nOb val = 255.0 / 255.0; break; } - sp_color_set_rgb_float( &(d->style.fill.value.color), val,val,val ); + d->style.fill.value.color.set( val, val, val ); d->fill_set = true; break; @@ -817,7 +817,7 @@ myEnhMetaFileProc(HDC hDC, HANDLETABLE *lpHTable, ENHMETARECORD *lpEMFR, int nOb float val = index == BLACK_PEN ? 0 : 1; d->style.stroke_dasharray_set = 0; d->style.stroke_width.value = 1.0; - sp_color_set_rgb_float( &(d->style.stroke.value.color), val,val,val ); + d->style.stroke.value.color.set( val, val, val ); d->stroke_set = true; diff --git a/src/extension/internal/odf.cpp b/src/extension/internal/odf.cpp index 61e3e593e..e233515c9 100644 --- a/src/extension/internal/odf.cpp +++ b/src/extension/internal/odf.cpp @@ -1559,8 +1559,7 @@ bool OdfOutput::processStyle(Writer &outs, SPItem *item, //## FILL if (style->fill.isColor()) { - guint32 fillCol = - sp_color_get_rgba32_ualpha(&style->fill.value.color, 0); + guint32 fillCol = style->fill.value.color.toRGBA32( 0 ); char buf[16]; int r = (fillCol >> 24) & 0xff; int g = (fillCol >> 16) & 0xff; @@ -1578,8 +1577,7 @@ bool OdfOutput::processStyle(Writer &outs, SPItem *item, //## STROKE if (style->stroke.isColor()) { - guint32 strokeCol = - sp_color_get_rgba32_ualpha(&style->stroke.value.color, 0); + guint32 strokeCol = style->stroke.value.color.toRGBA32( 0 ); char buf[16]; int r = (strokeCol >> 24) & 0xff; int g = (strokeCol >> 16) & 0xff; |
