diff options
| author | Ralf Stephan <ralf@ark.in-berlin.de> | 2006-02-13 19:14:47 +0000 |
|---|---|---|
| committer | rwst <rwst@users.sourceforge.net> | 2006-02-13 19:14:47 +0000 |
| commit | dce08c184686d4cef1f1961926cce339429f5aba (patch) | |
| tree | 58a437a00423768c653d1a90ddb5cf65bfe71efd /src/display | |
| parent | closed up denial-of-service attack vector (ironically located in an (diff) | |
| download | inkscape-dce08c184686d4cef1f1961926cce339429f5aba.tar.gz inkscape-dce08c184686d4cef1f1961926cce339429f5aba.zip | |
bulk whitespace removal patch #1198588 by gigaclon
(bzr r134)
Diffstat (limited to 'src/display')
| -rw-r--r-- | src/display/canvas-bpath.cpp | 36 | ||||
| -rw-r--r-- | src/display/sp-canvas.cpp | 14 | ||||
| -rw-r--r-- | src/display/sp-ctrlline.cpp | 6 | ||||
| -rw-r--r-- | src/display/sp-ctrlquadr.cpp | 6 |
4 files changed, 31 insertions, 31 deletions
diff --git a/src/display/canvas-bpath.cpp b/src/display/canvas-bpath.cpp index a6434ae3d..d85f77785 100644 --- a/src/display/canvas-bpath.cpp +++ b/src/display/canvas-bpath.cpp @@ -34,7 +34,7 @@ static void sp_canvas_bpath_destroy (GtkObject *object); static void sp_canvas_bpath_update (SPCanvasItem *item, NR::Matrix const &affine, unsigned int flags); static void sp_canvas_bpath_render (SPCanvasItem *item, SPCanvasBuf *buf); static double sp_canvas_bpath_point (SPCanvasItem *item, NR::Point p, SPCanvasItem **actual_item); - + static SPCanvasItemClass *parent_class; GtkType @@ -97,7 +97,7 @@ sp_canvas_bpath_destroy (GtkObject *object) delete cbp->fill_shp; cbp->fill_shp = NULL; } - + if (cbp->stroke_shp) { delete cbp->stroke_shp; cbp->stroke_shp = NULL; @@ -126,7 +126,7 @@ sp_canvas_bpath_update (SPCanvasItem *item, NR::Matrix const &affine, unsigned i delete cbp->fill_shp; cbp->fill_shp = NULL; } - + if (cbp->stroke_shp) { delete cbp->stroke_shp; cbp->stroke_shp = NULL; @@ -179,7 +179,7 @@ sp_canvas_bpath_update (SPCanvasItem *item, NR::Matrix const &affine, unsigned i thePath->Stroke(cbp->stroke_shp,false,0.5*cbp->stroke_width, join,butt,cbp->stroke_width*cbp->stroke_miterlimit ); // thePath->Stroke(theShape,false,0.5*cbp->stroke_width, join,butt,cbp->stroke_width*cbp->stroke_miterlimit ); // cbp->stroke_shp->ConvertToShape(theShape,fill_nonZero); - + cbp->stroke_shp->CalcBBox(); if ( cbp->stroke_shp->leftX < cbp->stroke_shp->rightX ) { if ( dbox.x0 >= dbox.x1 ) { @@ -197,7 +197,7 @@ sp_canvas_bpath_update (SPCanvasItem *item, NR::Matrix const &affine, unsigned i delete thePath; } - + item->x1 = (int)dbox.x0; item->y1 = (int)dbox.y0; item->x2 = (int)dbox.x1; @@ -233,7 +233,7 @@ static double sp_canvas_bpath_point (SPCanvasItem *item, NR::Point p, SPCanvasItem **actual_item) { SPCanvasBPath *cbp = SP_CANVAS_BPATH (item); - + if (cbp->fill_shp && (cbp->fill_shp->PtWinding(p) > 0 )) { *actual_item = item; return 0.0; @@ -248,7 +248,7 @@ sp_canvas_bpath_point (SPCanvasItem *item, NR::Point p, SPCanvasItem **actual_it if (cbp->fill_shp) { return distance(cbp->fill_shp, p); } - + return BIGVAL; } @@ -326,10 +326,10 @@ bpath_run_A8_OR (raster_info &dest,void *data,int st,float vst,int en,float ven) b = NR_RGBA32_B (tempCol.col); a = NR_RGBA32_A (tempCol.col); if (a == 0) return; - + vst*=a; ven*=a; - + if ( vst < 0 ) vst=0; if ( vst > 255 ) vst=255; if ( ven < 0 ) ven=0; @@ -409,7 +409,7 @@ void nr_pixblock_render_bpath_rgba (Shape* theS,uint32_t color,NRRectL &area,cha if ( it < area.y0 ) it=area.y0; if ( ir > area.x1 ) ir=area.x1; if ( ib > area.y1 ) ib=area.y1; - + /* // version par FloatLigne int curPt; float curY; @@ -449,27 +449,27 @@ void nr_pixblock_render_bpath_rgba (Shape* theS,uint32_t color,NRRectL &area,cha int curPt; float curY; theS->BeginQuickRaster(curY, curPt); - + BitLigne* theI[4]; for (int i=0;i<4;i++) theI[i]=new BitLigne(il,ir); IntLigne* theIL=new IntLigne(); - + theS->DirectQuickScan(curY,curPt,(float)(it),true,0.25); - + char* mdata=(char*)destBuf; uint32_t* ligStart=((uint32_t*)(mdata+(3*(il-area.x0)+stride*(it-area.y0)))); for (int y=it;y<ib;y++) { for (int i = 0; i < 4; i++) theI[i]->Reset(); - + for (int i = 0; i < 4; i++) - theS->QuickScan(curY, curPt, ((float)(y+0.25*(i+1))), + theS->QuickScan(curY, curPt, ((float)(y+0.25*(i+1))), fill_oddEven, theI[i], 0.25); - + theIL->Copy(4,theI); // theI[0]->Affiche(); // theIL->Affiche(); - + raster_info dest; dest.startPix=il; dest.endPix=ir; @@ -481,5 +481,5 @@ void nr_pixblock_render_bpath_rgba (Shape* theS,uint32_t color,NRRectL &area,cha } theS->EndQuickRaster(); for (int i=0;i<4;i++) delete theI[i]; - delete theIL; + delete theIL; } diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp index d1d7221f0..1c1171d35 100644 --- a/src/display/sp-canvas.cpp +++ b/src/display/sp-canvas.cpp @@ -495,7 +495,7 @@ sp_canvas_item_grab (SPCanvasItem *item, guint event_mask, GdkCursor *cursor, gu /* fixme: But Canvas actualle does get key events, so all we need is routing these here */ gdk_pointer_grab (SP_CANVAS_WINDOW (item->canvas), FALSE, (GdkEventMask)(event_mask & (~(GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK))), - NULL, cursor, etime); + NULL, cursor, etime); item->canvas->grabbed_item = item; item->canvas->grabbed_event_mask = event_mask; @@ -587,7 +587,7 @@ sp_canvas_item_grab_focus (SPCanvasItem *item) ev.focus_change.window = SP_CANVAS_WINDOW (item->canvas); ev.focus_change.send_event = FALSE; ev.focus_change.in = TRUE; - + emit_event (item->canvas, &ev); } } @@ -995,7 +995,7 @@ shutdown_transients (SPCanvas *canvas) canvas->tiles=NULL; canvas->tLeft=canvas->tTop=canvas->tRight=canvas->tBottom=0; canvas->tileH=canvas->tileV=0; - + if (canvas->grabbed_item) { canvas->grabbed_item = NULL; gdk_pointer_ungrab (GDK_CURRENT_TIME); @@ -1825,7 +1825,7 @@ sp_canvas_scroll_to (SPCanvas *canvas, double cx, double cy, unsigned int clear) canvas->y0 = iy; sp_canvas_resize_tiles(canvas,canvas->x0,canvas->y0,canvas->x0+canvas->widget.allocation.width,canvas->y0+canvas->widget.allocation.height); - + if (!clear) { // scrolling without zoom; redraw only the newly exposed areas if ((dx != 0) || (dy != 0)) { @@ -1861,7 +1861,7 @@ sp_canvas_update_now (SPCanvas *canvas) g_return_if_fail (canvas != NULL); g_return_if_fail (SP_IS_CANVAS (canvas)); - if (!(canvas->need_update || + if (!(canvas->need_update || canvas->need_redraw)) return; @@ -2051,9 +2051,9 @@ void sp_canvas_dirty_rect(SPCanvas* canvas,int nl,int nt,int nr,int nb) if ( tr > canvas->tRight ) tr=canvas->tRight; if ( tt < canvas->tTop ) tt=canvas->tTop; if ( tb > canvas->tBottom ) tb=canvas->tBottom; - + canvas->need_redraw = TRUE; - + for (int i=tl;i<tr;i++) { for (int j=tt;j<tb;j++) { canvas->tiles[(i-canvas->tLeft)+(j-canvas->tTop)*canvas->tileH]=1; diff --git a/src/display/sp-ctrlline.cpp b/src/display/sp-ctrlline.cpp index 0a278bb69..6715f890f 100644 --- a/src/display/sp-ctrlline.cpp +++ b/src/display/sp-ctrlline.cpp @@ -97,7 +97,7 @@ sp_ctrlline_destroy (GtkObject *object) delete ctrlline->shp; ctrlline->shp = NULL; } - + if (GTK_OBJECT_CLASS (parent_class)->destroy) (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } @@ -141,7 +141,7 @@ sp_ctrlline_update (SPCanvasItem *item, NR::Matrix const &affine, unsigned int f Path* thePath = new Path; thePath->MoveTo(NR::Point(cl->s.x, cl->s.y) * affine); thePath->LineTo(NR::Point(cl->e.x, cl->e.y) * affine); - + thePath->Convert(1.0); if ( cl->shp == NULL ) cl->shp=new Shape; thePath->Stroke(cl->shp,false,0.5,join_straight,butt_straight,20.0,false); @@ -158,7 +158,7 @@ sp_ctrlline_update (SPCanvasItem *item, NR::Matrix const &affine, unsigned int f } } delete thePath; - + item->x1 = (int)dbox.x0; item->y1 = (int)dbox.y0; item->x2 = (int)dbox.x1; diff --git a/src/display/sp-ctrlquadr.cpp b/src/display/sp-ctrlquadr.cpp index e9488cdb5..707d0e059 100644 --- a/src/display/sp-ctrlquadr.cpp +++ b/src/display/sp-ctrlquadr.cpp @@ -94,7 +94,7 @@ sp_ctrlquadr_destroy (GtkObject *object) delete ctrlquadr->shp; ctrlquadr->shp = NULL; } - + if (GTK_OBJECT_CLASS (parent_class)->destroy) (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } @@ -141,7 +141,7 @@ sp_ctrlquadr_update (SPCanvasItem *item, NR::Matrix const &affine, unsigned int thePath->LineTo(cl->p3 * affine); thePath->LineTo(cl->p4 * affine); thePath->LineTo(cl->p1 * affine); - + thePath->Convert(1.0); if ( cl->shp == NULL ) cl->shp=new Shape; @@ -160,7 +160,7 @@ sp_ctrlquadr_update (SPCanvasItem *item, NR::Matrix const &affine, unsigned int } } delete thePath; - + item->x1 = (int)dbox.x0; item->y1 = (int)dbox.y0; item->x2 = (int)dbox.x1; |
