From: <sm...@us...> - 2009-09-01 06:47:14
|
Revision: 10360 http://plplot.svn.sourceforge.net/plplot/?rev=10360&view=rev Author: smekal Date: 2009-09-01 06:47:01 +0000 (Tue, 01 Sep 2009) Log Message: ----------- wxWidgets driver now supports flushing of the screen -> better results now for example 17. Text clipping support now by wxGraphicsContext backend (e.g. example 09, example 21). Tried to improve fill_polygon method in wxGraphicsContext backend by explicitly calling DrawRectangle() for rectangles, but it seems wxWidgets optimizes the DrawPolygon() method anyway this way, so no improvements here. Modified Paths: -------------- trunk/drivers/wxwidgets.cpp trunk/drivers/wxwidgets.h trunk/drivers/wxwidgets_gc.cpp Modified: trunk/drivers/wxwidgets.cpp =================================================================== --- trunk/drivers/wxwidgets.cpp 2009-08-29 19:12:44 UTC (rev 10359) +++ trunk/drivers/wxwidgets.cpp 2009-09-01 06:47:01 UTC (rev 10360) @@ -374,6 +374,7 @@ #endif pls->color = 1; /* Is a color device */ + pls->dev_flush = 1; /* Handles flushes */ pls->dev_fill0 = 1; /* Can handle solid fills */ pls->dev_fill1 = 0; /* Can't handle pattern fills */ pls->dev_dash = 0; @@ -549,6 +550,7 @@ plOpenFile( pls ); pls->plbuf_write = 1; /* use the plot buffer! */ + pls->dev_flush = 0; /* No need for flushes */ pls->termin = 0; /* file oriented device */ pls->graphx = GRAPHICS_MODE; /* No text mode for this driver (at least for now, might add a console window if I ever figure it out and have the inclination) */ pls->page = 0; @@ -578,7 +580,7 @@ dev->DrawLine( x1a, y1a, x2a, y2a ); if( !(dev->resizing) && dev->ownGUI ) { - dev->comcount+=10; + dev->comcount++; if( dev->comcount>MAX_COMCOUNT ) { wxRunApp( pls, true ); dev->comcount=0; @@ -606,7 +608,7 @@ dev->DrawPolyline( xa, ya, npts ); if( !(dev->resizing) && dev->ownGUI ) { - dev->comcount+=10; + dev->comcount++; if( dev->comcount>MAX_COMCOUNT ) { wxRunApp( pls, true ); dev->comcount=0; @@ -848,6 +850,13 @@ pls->sppxmi, pls->sppymi, pls->sppxma, pls->sppyma ); break; + case PLESC_FLUSH: /* forced update of the window */ + if( !(dev->resizing) && dev->ownGUI ) { + wxRunApp( pls, true ); + dev->comcount=0; + } + break; + case PLESC_GETC: if( dev->ownGUI ) GetCursorCmd( pls, (PLGraphicsIn *) ptr ); Modified: trunk/drivers/wxwidgets.h =================================================================== --- trunk/drivers/wxwidgets.h 2009-08-29 19:12:44 UTC (rev 10359) +++ trunk/drivers/wxwidgets.h 2009-09-01 06:47:01 UTC (rev 10360) @@ -363,7 +363,7 @@ /* after how many commands the window should be refreshed */ -#define MAX_COMCOUNT 5000 +#define MAX_COMCOUNT 10000 /* wxwidgets application definition (if needed) */ WX_DEFINE_ARRAY( wxPLplotFrame*, wxArrayOfwxPLplotFrame ); Modified: trunk/drivers/wxwidgets_gc.cpp =================================================================== --- trunk/drivers/wxwidgets_gc.cpp 2009-08-29 19:12:44 UTC (rev 10359) +++ trunk/drivers/wxwidgets_gc.cpp 2009-09-01 06:47:01 UTC (rev 10360) @@ -131,18 +131,64 @@ { // Log_Verbose( "%s", __FUNCTION__ ); - wxGraphicsPath path=m_context->CreatePath(); - path.MoveToPoint( pls->dev_x[0]/scalex, height-pls->dev_y[0]/scaley ); - for( int i=1; i < pls->dev_npts; i++ ) - path.AddLineToPoint( pls->dev_x[i]/scalex, height-pls->dev_y[i]/scaley ); - path.CloseSubpath(); - - m_context->DrawPath( path ); + bool isRect=false; + short* x = pls->dev_x; + short* y = pls->dev_y; + + if(pls->dev_npts==4) { // Check if it's a rectangle. If so, it can be made faster to display + if(x[0]==x[1] && x[2]==x[3] && y[0]==y[3] && y[1]==y[2]) + isRect=true; + else if(x[0]==x[3] && x[1]==x[2] && y[0]==y[1] && y[2]==y[3]) + isRect=true; + } + if(pls->dev_npts==5) { + if(x[0]==x[4] && y[0]==y[4]) { + if(x[0]==x[1] && x[2]==x[3] && y[0]==y[3] && y[1]==y[2]) + isRect=true; + else if(x[0]==x[3] && x[1]==x[2] && y[0]==y[1] && y[2]==y[3]) + isRect=true; + } + } + + if(isRect) { //isRect) { + double x1, y1, x2, y2, x0, y0, w, h; - wxDouble x, y, w, h; - path.GetBox( &x, &y, &w, &h ); - - AddtoClipRegion( (int)x, (int)y, (int)(x+w), (int)(y+h) ); + x1=x[0]/scalex; + x2=x[2]/scalex; + y1=height-y[0]/scaley; + y2=height-y[2]/scaley; + + if(x1<x2) { + x0=x1; + w=x2-x1; + } else { + x0=x2; + w=x1-x2; + } + if(y1<y2) { + y0=y1; + h=y2-y1; + } else{ + y0=y2; + h=y1-y2; + } + m_context->DrawRectangle( x0, y0, w, h ); + AddtoClipRegion( (int)x0, (int)y0, (int)w, (int)h ); + } else { + wxGraphicsPath path=m_context->CreatePath(); + path.MoveToPoint( x[0]/scalex, height-y[0]/scaley ); + for( int i=1; i < pls->dev_npts; i++ ) + path.AddLineToPoint( x[i]/scalex, height-y[i]/scaley ); + path.CloseSubpath(); + + m_context->DrawPath( path ); + + wxDouble x, y, w, h; + path.GetBox( &x, &y, &w, &h ); + + AddtoClipRegion( (int)x, (int)y, (int)(x+w), (int)(y+h) ); + } + } @@ -341,6 +387,17 @@ /* Calculate the font size (in pixels) */ fontSize = pls->chrht * VIRTUAL_PIXELS_PER_MM/scaley * 1.3; + /* Use PLplot core routine to get the corners of the clipping rectangle */ + PLINT rcx[4], rcy[4]; + difilt_clip(rcx, rcy); + + wxPoint cpoints[4]; + for( int i=0; i<4; i++ ) { + cpoints[i].x = rcx[i]/scalex; + cpoints[i].y = height-rcy[i]/scaley; + } + m_context->Clip( wxRegion(4, cpoints) ); + /* text color */ textRed=pls->cmap0[pls->icol0].r; textGreen=pls->cmap0[pls->icol0].g; @@ -370,6 +427,8 @@ m_context->PopState(); AddtoClipRegion( 0, 0, width, height ); + + m_context->ResetClip(); } #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2009-12-07 22:04:17
|
Revision: 10702 http://plplot.svn.sourceforge.net/plplot/?rev=10702&view=rev Author: andrewross Date: 2009-12-07 22:04:09 +0000 (Mon, 07 Dec 2009) Log Message: ----------- Fix longstanding bug with 3D text in ps / psttf drivers by adopting the helper function plRotationShear used by cairo driver to decompose a plplot transform into rotation, shear and stride. Modified Paths: -------------- trunk/drivers/ps.c trunk/drivers/psttf.cc Modified: trunk/drivers/ps.c =================================================================== --- trunk/drivers/ps.c 2009-12-07 21:42:50 UTC (rev 10701) +++ trunk/drivers/ps.c 2009-12-07 22:04:09 UTC (rev 10702) @@ -739,7 +739,7 @@ proc_str( PLStream *pls, EscText *args ) { PLFLT *t = args->xform, tt[4]; /* Transform matrices */ - PLFLT theta; /* Rotation angle and shear from the matrix */ + PLFLT theta, shear, stride; /* Rotation angle and shear from the matrix */ PLFLT ft_ht, offset; /* Font height and offset */ PLFLT cs, sn, l1, l2; PSDev *dev = (PSDev *) pls->dev; @@ -846,10 +846,9 @@ /* The transform matrix has only rotations and shears; extract them */ - theta = acos( t[0] ) * 180. / PI; /* Determine the rotation (in degrees)... */ - if ( t[2] < 0. ) theta *= -1.; /* ... and sign ... */ - cs = cos( theta * PI / 180. ); - sn = sin( theta * PI / 180. ); + plRotationShear( t, &theta, &shear, &stride ); + cs = cos( theta ); + sn = sin( theta ); tt[0] = t[0] * cs + t[2] * sn; tt[1] = t[1] * cs + t[3] * sn; tt[2] = -t[0] * sn + t[2] * cs; @@ -875,16 +874,16 @@ offset = -ENLARGE * ft_ht / 2.; /* Determine the adjustment for page orientation */ - theta -= 90. * pls->diorot; - args->y += (PLINT) ( offset * cos( theta * PI / 180. )); - args->x -= (PLINT) ( offset * sin( theta * PI / 180. )); + theta -= PI/2. * pls->diorot; + args->y += (PLINT) ( offset * cos( theta )); + args->x -= (PLINT) ( offset * sin( theta )); /* ps driver is rotated by default */ plRotPhy( ORIENTATION, dev->xmin, dev->ymin, dev->xmax, dev->ymax, &( args->x ), &( args->y )); /* Correct for the fact ps driver uses landscape by default */ - theta += 90.; + theta += PI/2.; /* Output */ /* Set clipping */ @@ -911,7 +910,7 @@ fprintf( OF, " %d %d M\n", args->x, args->y ); /* Save the current position and set the string rotation */ - fprintf( OF, "gsave %.3f R\n", TRMFLT( theta )); + fprintf( OF, "gsave %.3f R\n", TRMFLT( theta*180./PI )); /* Purge escape sequences from string, so that postscript can find it's * length. The string length is computed with the current font, and can @@ -1039,8 +1038,8 @@ * 0.6 * character height. Add on an extra 1.5 * character height * for safety. */ - cs = cos( theta / 180. * PI ); - sn = sin( theta / 180. * PI ); + cs = cos( theta ); + sn = sin( theta ); l1 = -i * args->just; l2 = i * ( 1. - args->just ); /* Factor of 0.6 is an empirical fudge to convert character Modified: trunk/drivers/psttf.cc =================================================================== --- trunk/drivers/psttf.cc 2009-12-07 21:42:50 UTC (rev 10701) +++ trunk/drivers/psttf.cc 2009-12-07 22:04:09 UTC (rev 10702) @@ -805,7 +805,7 @@ proc_str (PLStream *pls, EscText *args) { PLFLT *t = args->xform, tt[4]; /* Transform matrices */ - PLFLT theta; /* Rotation angle and shear from the matrix */ + PLFLT theta, shear, stride; /* Rotation angle and shear from the matrix */ PLFLT ft_ht, offset; /* Font height and offset */ PLFLT cs,sn; PSDev *dev = (PSDev *) pls->dev; @@ -907,10 +907,9 @@ /* The transform matrix has only rotations and shears; extract them */ - theta = acos(t[0]) * 180. / PI; /* Determine the rotation (in degrees)... */ - if (t[2] < 0.) theta *= -1.; /* ... and sign ... */ - cs = cos(theta*PI/180.); - sn = sin(theta*PI/180.); + plRotationShear( t, &theta, &shear, &stride ); + cs = cos(theta); + sn = sin(theta); tt[0] = t[0]*cs + t[2]*sn; tt[1] = t[1]*cs + t[3]*sn; tt[2] = -t[0]*sn + t[2]*cs; @@ -936,16 +935,16 @@ offset = -ENLARGE * ft_ht / 2.; /* Determine the adjustment for page orientation */ - theta -= 90.*pls->diorot; - args->y += (int) (offset*cos(theta*PI/180.)); - args->x -= (int) (offset*sin(theta*PI/180.)); + theta -= PI/2.*pls->diorot; + args->y += (int) (offset*cos(theta)); + args->x -= (int) (offset*sin(theta)); /* ps driver is rotated by default */ plRotPhy(ORIENTATION, dev->xmin, dev->ymin, dev->xmax, dev->ymax, &(args->x), &(args->y)); /* Correct for the fact ps driver uses landscape by default */ - theta += 90.; + theta += PI/2.; /* Output */ /* Set clipping */ @@ -974,7 +973,7 @@ doc->osBody() << " " << args->x << " " << args->y << " M\n"; /* Save the current position and set the string rotation */ - doc->osBody() << "gsave " << TRMFLT(theta) << " R\n"; + doc->osBody() << "gsave " << TRMFLT(theta*180./PI) << " R\n"; doc->osBody() << "[" << TRMFLT(tt[0]) << " " << TRMFLT(tt[2]) << " " << TRMFLT(tt[1]) << " " << TRMFLT(tt[3]) << " 0 0] concat\n"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hba...@us...> - 2010-09-04 12:57:44
|
Revision: 11160 http://plplot.svn.sourceforge.net/plplot/?rev=11160&view=rev Author: hbabcock Date: 2010-09-04 12:57:38 +0000 (Sat, 04 Sep 2010) Log Message: ----------- Change xcairo and xwin drivers to set the stream_closed flag if their X window is closed. Modified Paths: -------------- trunk/drivers/cairo.c trunk/drivers/xwin.c Modified: trunk/drivers/cairo.c =================================================================== --- trunk/drivers/cairo.c 2010-09-04 12:56:24 UTC (rev 11159) +++ trunk/drivers/cairo.c 2010-09-04 12:57:38 UTC (rev 11160) @@ -1772,7 +1772,7 @@ break; case ClientMessage: // plexit("X Window closed"); - aStream->closed = 1; + pls->stream_closed = TRUE; aStream->exit_event_loop = 1; break; case Expose: Modified: trunk/drivers/xwin.c =================================================================== --- trunk/drivers/xwin.c 2010-09-04 12:56:24 UTC (rev 11159) +++ trunk/drivers/xwin.c 2010-09-04 12:57:38 UTC (rev 11160) @@ -1485,7 +1485,10 @@ if ( event->xclient.data.l[0] == XInternAtom( xwd->display, "WM_DELETE_WINDOW", False ) ) { pls->nopause = TRUE; - plexit( "" ); + pls->stream_closed = TRUE; + dev->exit_eventloop = TRUE; + // plexit( "" ); + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2011-03-03 19:44:28
|
Revision: 11590 http://plplot.svn.sourceforge.net/plplot/?rev=11590&view=rev Author: airwin Date: 2011-03-03 19:44:22 +0000 (Thu, 03 Mar 2011) Log Message: ----------- Make ps, psc, psttf, and psttfc devices honor the -eofill option. The results for example 27 are the same as for the xwin case. Modified Paths: -------------- trunk/drivers/ps.c trunk/drivers/psttf.cc Modified: trunk/drivers/ps.c =================================================================== --- trunk/drivers/ps.c 2011-03-03 00:53:48 UTC (rev 11589) +++ trunk/drivers/ps.c 2011-03-03 19:44:22 UTC (rev 11590) @@ -362,7 +362,10 @@ // Modify to use fill and stroke for better output with // anti-aliasing //fprintf(OF, "/F {fill} def\n"); - fprintf( OF, "/F {closepath gsave fill grestore stroke} def " ); + if ( pls->dev_eofill ) + fprintf( OF, "/F {closepath gsave eofill grestore stroke} def " ); + else + fprintf( OF, "/F {closepath gsave fill grestore stroke} def " ); fprintf( OF, "/N {newpath} def" ); fprintf( OF, "/C {setrgbcolor} def\n" ); fprintf( OF, "/G {setgray} def\n" ); Modified: trunk/drivers/psttf.cc =================================================================== --- trunk/drivers/psttf.cc 2011-03-03 00:53:48 UTC (rev 11589) +++ trunk/drivers/psttf.cc 2011-03-03 19:44:22 UTC (rev 11590) @@ -422,7 +422,10 @@ doc->osHeader() << "/A {0.5 0 360 arc} def\n"; doc->osHeader() << "/S {stroke} def\n"; doc->osHeader() << "/Z {stroke newpath} def\n"; - doc->osHeader() << "/F {closepath gsave fill grestore stroke} def\n"; + if ( pls->dev_eofill ) + doc->osHeader() << "/F {closepath gsave eofill grestore stroke} def\n"; + else + doc->osHeader() << "/F {closepath gsave fill grestore stroke} def\n"; doc->osHeader() << "/N {newpath} def\n"; doc->osHeader() << "/C {setrgbcolor} def\n"; doc->osHeader() << "/G {setgray} def\n"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2011-05-06 19:14:22
|
Revision: 11744 http://plplot.svn.sourceforge.net/plplot/?rev=11744&view=rev Author: andrewross Date: 2011-05-06 19:14:16 +0000 (Fri, 06 May 2011) Log Message: ----------- Fix a couple of typos in comments. Modified Paths: -------------- trunk/drivers/aqt.c trunk/drivers/xwin.c Modified: trunk/drivers/aqt.c =================================================================== --- trunk/drivers/aqt.c 2011-05-04 18:38:51 UTC (rev 11743) +++ trunk/drivers/aqt.c 2011-05-06 19:14:16 UTC (rev 11744) @@ -738,7 +738,7 @@ font = plP_FCI2FontName( fci, AQT_FontLookup, AQT_N_FontLookup ); - // check whether that font exists & if not, use standard font instread + // check whether that font exists & if not, use standard font instead if ( font == NULL ) { Modified: trunk/drivers/xwin.c =================================================================== --- trunk/drivers/xwin.c 2011-05-04 18:38:51 UTC (rev 11743) +++ trunk/drivers/xwin.c 2011-05-06 19:14:16 UTC (rev 11744) @@ -1294,7 +1294,7 @@ //-------------------------------------------------------------------------- // events_thread() // -// This function is being running continously by a tread and is +// This function is being running continously by a thread and is // responsible for dealing with expose and resize X events, in // the case that the main program is too busy to honor them. // This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2011-10-14 08:03:58
|
Revision: 11969 http://plplot.svn.sourceforge.net/plplot/?rev=11969&view=rev Author: andrewross Date: 2011-10-14 08:03:51 +0000 (Fri, 14 Oct 2011) Log Message: ----------- A few minor fixes for gcc warnings in some of the drivers. Modified Paths: -------------- trunk/drivers/ps.c trunk/drivers/svg.c trunk/drivers/tkwin.c Modified: trunk/drivers/ps.c =================================================================== --- trunk/drivers/ps.c 2011-10-14 07:12:16 UTC (rev 11968) +++ trunk/drivers/ps.c 2011-10-14 08:03:51 UTC (rev 11969) @@ -90,7 +90,7 @@ static void ps_dispatch_init_helper( PLDispatchTable *pdt, - char *menustr, char *devnam, + const char *menustr, const char *devnam, int type, int seq, plD_init_fp init ) { #ifndef ENABLE_DYNDRIVERS Modified: trunk/drivers/svg.c =================================================================== --- trunk/drivers/svg.c 2011-10-14 07:12:16 UTC (rev 11968) +++ trunk/drivers/svg.c 2011-10-14 08:03:51 UTC (rev 11969) @@ -81,12 +81,12 @@ // Functions for writing XML SVG tags to a file -static void svg_open( SVG *, char * ); +static void svg_open( SVG *, const char * ); static void svg_open_end( SVG * ); -static void svg_attr_value( SVG *, char *, char * ); -static void svg_attr_values( SVG *, char *, char *, ... ); -static void svg_close( SVG *, char * ); -static void svg_general( SVG *, char * ); +static void svg_attr_value( SVG *, const char *, const char * ); +static void svg_attr_values( SVG *, const char *, const char *, ... ); +static void svg_close( SVG *, const char * ); +static void svg_general( SVG *, const char * ); static void svg_indent( SVG * ); static void svg_stroke_width( PLStream * ); static void svg_stroke_color( PLStream * ); @@ -564,7 +564,7 @@ void proc_str( PLStream *pls, EscText *args ) { char plplot_esc; - short static which_clip = 0; + static short which_clip = 0; short i; short totalTags = 1; short ucs4Len = args->unicode_array_len; @@ -893,7 +893,7 @@ // Used to open a new XML expression, sets the indent level appropriately //-------------------------------------------------------------------------- -void svg_open( SVG *aStream, char *tag ) +void svg_open( SVG *aStream, const char *tag ) { svg_indent( aStream ); fprintf( aStream->svgFile, "<%s\n", tag ); @@ -921,7 +921,7 @@ // i.e. foo="bar" //-------------------------------------------------------------------------- -void svg_attr_value( SVG *aStream, char *attribute, char *value ) +void svg_attr_value( SVG *aStream, const char *attribute, const char *value ) { svg_indent( aStream ); fprintf( aStream->svgFile, "%s=\"%s\"\n", attribute, value ); @@ -938,10 +938,10 @@ // //-------------------------------------------------------------------------- -void svg_attr_values( SVG *aStream, char *attribute, char *format, ... ) +void svg_attr_values( SVG *aStream, const char *attribute, const char *format, ... ) { va_list ap; - char *p, *sval; + const char *p, *sval; int ival; double dval; @@ -989,7 +989,7 @@ // Used to close a XML expression, sets the indent level appropriately //-------------------------------------------------------------------------- -void svg_close( SVG *aStream, char *tag ) +void svg_close( SVG *aStream, const char *tag ) { aStream->svgIndent -= 2; svg_indent( aStream ); @@ -1009,7 +1009,7 @@ // Used to print any text into the svgFile //-------------------------------------------------------------------------- -void svg_general( SVG *aStream, char *text ) +void svg_general( SVG *aStream, const char *text ) { svg_indent( aStream ); fprintf( aStream->svgFile, "%s", text ); Modified: trunk/drivers/tkwin.c =================================================================== --- trunk/drivers/tkwin.c 2011-10-14 07:12:16 UTC (rev 11968) +++ trunk/drivers/tkwin.c 2011-10-14 08:03:51 UTC (rev 11969) @@ -391,7 +391,7 @@ // but we will actually 'free' it later ourselves, and therefore // need to own the memory. // - pls->FileName = strdup( TkGetDefaultScreenName( NULL, NULL ) ); + pls->FileName = plstrdup( TkGetDefaultScreenName( NULL, NULL ) ); } tkwd->display = pls->plPlotterPtr->display; #else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2011-11-28 20:03:27
|
Revision: 12062 http://plplot.svn.sourceforge.net/plplot/?rev=12062&view=rev Author: airwin Date: 2011-11-28 20:03:20 +0000 (Mon, 28 Nov 2011) Log Message: ----------- More "const char *" fixups to quiet compiler warnings. Modified Paths: -------------- trunk/drivers/ps.c trunk/drivers/wxwidgets.cpp Modified: trunk/drivers/ps.c =================================================================== --- trunk/drivers/ps.c 2011-11-28 10:01:16 UTC (rev 12061) +++ trunk/drivers/ps.c 2011-11-28 20:03:20 UTC (rev 12062) @@ -94,8 +94,8 @@ int type, int seq, plD_init_fp init ) { #ifndef ENABLE_DYNDRIVERS - pdt->pl_MenuStr = menustr; - pdt->pl_DevName = devnam; + pdt->pl_MenuStr = (char *) menustr; + pdt->pl_DevName = (char *) devnam; #else (void) menustr; // Cast to void to silence compiler warnings about unused parameters (void) devnam; Modified: trunk/drivers/wxwidgets.cpp =================================================================== --- trunk/drivers/wxwidgets.cpp 2011-11-28 10:01:16 UTC (rev 12061) +++ trunk/drivers/wxwidgets.cpp 2011-11-28 20:03:20 UTC (rev 12062) @@ -514,8 +514,8 @@ void plD_dispatch_init_wxwidgets( PLDispatchTable *pdt ) { #ifndef ENABLE_DYNDRIVERS - pdt->pl_MenuStr = "wxWidgets DC"; - pdt->pl_DevName = "wxwidgets"; + pdt->pl_MenuStr = (char *) "wxWidgets DC"; + pdt->pl_DevName = (char *) "wxwidgets"; #endif pdt->pl_type = plDevType_Interactive; pdt->pl_seq = 51; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2011-12-02 10:31:18
|
Revision: 12088 http://plplot.svn.sourceforge.net/plplot/?rev=12088&view=rev Author: andrewross Date: 2011-12-02 10:31:07 +0000 (Fri, 02 Dec 2011) Log Message: ----------- Remove unneeded (char *) casts from driver strings. Modified Paths: -------------- trunk/drivers/ps.c trunk/drivers/psttf.cc trunk/drivers/wxwidgets.cpp Modified: trunk/drivers/ps.c =================================================================== --- trunk/drivers/ps.c 2011-12-02 10:12:46 UTC (rev 12087) +++ trunk/drivers/ps.c 2011-12-02 10:31:07 UTC (rev 12088) @@ -94,8 +94,8 @@ int type, int seq, plD_init_fp init ) { #ifndef ENABLE_DYNDRIVERS - pdt->pl_MenuStr = (char *) menustr; - pdt->pl_DevName = (char *) devnam; + pdt->pl_MenuStr = menustr; + pdt->pl_DevName = devnam; #else (void) menustr; // Cast to void to silence compiler warnings about unused parameters (void) devnam; Modified: trunk/drivers/psttf.cc =================================================================== --- trunk/drivers/psttf.cc 2011-12-02 10:12:46 UTC (rev 12087) +++ trunk/drivers/psttf.cc 2011-12-02 10:31:07 UTC (rev 12088) @@ -125,8 +125,8 @@ int type, int seq, plD_init_fp init ) { #ifndef ENABLE_DYNDRIVERS - pdt->pl_MenuStr = (char *) menustr; - pdt->pl_DevName = (char *) devnam; + pdt->pl_MenuStr = menustr; + pdt->pl_DevName = devnam; #else (void) menustr; // Cast to void to silence compiler warnings about unused parameters (void) devnam; Modified: trunk/drivers/wxwidgets.cpp =================================================================== --- trunk/drivers/wxwidgets.cpp 2011-12-02 10:12:46 UTC (rev 12087) +++ trunk/drivers/wxwidgets.cpp 2011-12-02 10:31:07 UTC (rev 12088) @@ -514,8 +514,8 @@ void plD_dispatch_init_wxwidgets( PLDispatchTable *pdt ) { #ifndef ENABLE_DYNDRIVERS - pdt->pl_MenuStr = (char *) "wxWidgets DC"; - pdt->pl_DevName = (char *) "wxwidgets"; + pdt->pl_MenuStr = "wxWidgets DC"; + pdt->pl_DevName = "wxwidgets"; #endif pdt->pl_type = plDevType_Interactive; pdt->pl_seq = 51; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2012-05-08 01:37:33
|
Revision: 12194 http://plplot.svn.sourceforge.net/plplot/?rev=12194&view=rev Author: airwin Date: 2012-05-08 01:37:27 +0000 (Tue, 08 May 2012) Log Message: ----------- AWI for Phil Rosenberg. Fix a small bug whereby the styles (italic, bold etc) and weights weren't being applied correctly by wxWidgets in the _gc and _dc files. An & was used instead of a | when combining style and weight flags. Modified Paths: -------------- trunk/drivers/wxwidgets_dc.cpp trunk/drivers/wxwidgets_gc.cpp Modified: trunk/drivers/wxwidgets_dc.cpp =================================================================== --- trunk/drivers/wxwidgets_dc.cpp 2012-05-01 17:27:14 UTC (rev 12193) +++ trunk/drivers/wxwidgets_dc.cpp 2012-05-08 01:37:27 UTC (rev 12194) @@ -368,7 +368,7 @@ m_font = wxFont::New( (int) ( fontSize * fontScale < 4 ? 4 : fontSize * fontScale ), fontFamilyLookup[fontFamily], - fontStyleLookup[fontStyle] & fontWeightLookup[fontWeight] ); + fontStyleLookup[fontStyle] | fontWeightLookup[fontWeight] ); m_font->SetUnderlined( underlined ); m_dc->SetFont( *m_font ); } Modified: trunk/drivers/wxwidgets_gc.cpp =================================================================== --- trunk/drivers/wxwidgets_gc.cpp 2012-05-01 17:27:14 UTC (rev 12193) +++ trunk/drivers/wxwidgets_gc.cpp 2012-05-08 01:37:27 UTC (rev 12194) @@ -398,7 +398,7 @@ delete m_font; m_font = wxFont::New( static_cast<int>( fontSize * fontScale ), fontFamilyLookup[fontFamily], - fontStyleLookup[fontStyle] & fontWeightLookup[fontWeight] ); + fontStyleLookup[fontStyle] | fontWeightLookup[fontWeight] ); m_font->SetUnderlined( underlined ); m_context->SetFont( *m_font, wxColour( textRed, textGreen, textBlue ) ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hba...@us...> - 2012-11-18 20:31:16
|
Revision: 12276 http://plplot.svn.sourceforge.net/plplot/?rev=12276&view=rev Author: hbabcock Date: 2012-11-18 20:31:09 +0000 (Sun, 18 Nov 2012) Log Message: ----------- Change the numbering of the various cairo drivers so that the EPS driver is listed next to the PS driver. Modified Paths: -------------- trunk/drivers/cairo.c trunk/drivers/cairo.driver_info.in Modified: trunk/drivers/cairo.c =================================================================== --- trunk/drivers/cairo.c 2012-11-17 22:49:34 UTC (rev 12275) +++ trunk/drivers/cairo.c 2012-11-18 20:31:09 UTC (rev 12276) @@ -152,24 +152,24 @@ #if defined ( PLD_pscairo ) "pscairo:Cairo PS Driver:0:cairo:102:pscairo\n" #endif +#if defined ( PLD_epscairo ) + "epscairo:Cairo EPS Driver:0:cairo:103:epscairo\n" +#endif #if defined ( PLD_svgcairo ) - "svgcairo:Cairo SVG Driver:0:cairo:103:svgcairo\n" + "svgcairo:Cairo SVG Driver:0:cairo:104:svgcairo\n" #endif #if defined ( PLD_pngcairo ) - "pngcairo:Cairo PNG Driver:0:cairo:104:pngcairo\n" + "pngcairo:Cairo PNG Driver:0:cairo:105:pngcairo\n" #endif #if defined ( PLD_memcairo ) - "memcairo:Cairo Memory Driver:0:cairo:105:memcairo\n" + "memcairo:Cairo Memory Driver:0:cairo:106:memcairo\n" #endif #if defined ( PLD_extcairo ) - "extcairo:Cairo External Context Driver:0:cairo:106:extcairo\n" + "extcairo:Cairo External Context Driver:0:cairo:107:extcairo\n" #endif #if defined ( PLD_wincairo ) - "wincairo:Cairo Microscoft Windows Driver:0:cairo:107:wincairo\n" + "wincairo:Cairo Microscoft Windows Driver:0:cairo:108:wincairo\n" #endif -#if defined ( PLD_epscairo ) - "epscairo:Cairo EPS Driver:0:cairo:108:epscairo\n" -#endif ; // Modified: trunk/drivers/cairo.driver_info.in =================================================================== --- trunk/drivers/cairo.driver_info.in 2012-11-17 22:49:34 UTC (rev 12275) +++ trunk/drivers/cairo.driver_info.in 2012-11-18 20:31:09 UTC (rev 12276) @@ -1,9 +1,9 @@ xcairo:Cairo X Windows Driver:1:cairo:100:xcairo pdfcairo:Cairo PDF Driver:0:cairo:101:pdfcairo pscairo:Cairo PS Driver:0:cairo:102:pscairo -svgcairo:Cairo SVG Driver:0:cairo:103:svgcairo -pngcairo:Cairo PNG Driver:0:cairo:104:pngcairo -memcairo:Cairo Memory Driver:0:cairo:105:memcairo -extcairo:Cairo External Context Driver:0:cairo:106:extcairo -wincairo:Cairo Microscoft Windows Driver:0:cairo:107:wincairo -epscairo:Cairo EPS Driver:0:cairo:108:epscairo +epscairo:Cairo EPS Driver:0:cairo:103:epscairo +svgcairo:Cairo SVG Driver:0:cairo:104:svgcairo +pngcairo:Cairo PNG Driver:0:cairo:105:pngcairo +memcairo:Cairo Memory Driver:0:cairo:106:memcairo +extcairo:Cairo External Context Driver:0:cairo:107:extcairo +wincairo:Cairo Microscoft Windows Driver:0:cairo:108:wincairo This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-12-17 05:32:21
|
Revision: 12874 http://sourceforge.net/p/plplot/code/12874 Author: airwin Date: 2013-12-17 05:32:16 +0000 (Tue, 17 Dec 2013) Log Message: ----------- Turn cast from "const char *" to "char *" from implicit (which in the psttf.cc case ended up as a build error) to explicit form. This build error was found as a result of running the comprehensive_test.sh script, but as far as I can tell nothing was changed for psttf.cc from when this script ran without errors not that long ago for exactly the same (normal build as opposed to epa_build) environment. So I do not have a clue why we suddenly have this build error, but I have now fixed it with the explicit casts. Modified Paths: -------------- trunk/drivers/ps.c trunk/drivers/psttf.cc Modified: trunk/drivers/ps.c =================================================================== --- trunk/drivers/ps.c 2013-12-17 01:27:14 UTC (rev 12873) +++ trunk/drivers/ps.c 2013-12-17 05:32:16 UTC (rev 12874) @@ -94,8 +94,8 @@ int type, int seq, plD_init_fp init ) { #ifndef ENABLE_DYNDRIVERS - pdt->pl_MenuStr = menustr; - pdt->pl_DevName = devnam; + pdt->pl_MenuStr = (char *) menustr; + pdt->pl_DevName = (char *) devnam; #else (void) menustr; // Cast to void to silence compiler warnings about unused parameters (void) devnam; Modified: trunk/drivers/psttf.cc =================================================================== --- trunk/drivers/psttf.cc 2013-12-17 01:27:14 UTC (rev 12873) +++ trunk/drivers/psttf.cc 2013-12-17 05:32:16 UTC (rev 12874) @@ -125,8 +125,8 @@ int type, int seq, plD_init_fp init ) { #ifndef ENABLE_DYNDRIVERS - pdt->pl_MenuStr = menustr; - pdt->pl_DevName = devnam; + pdt->pl_MenuStr = (char *) menustr; + pdt->pl_DevName = (char *) devnam; #else (void) menustr; // Cast to void to silence compiler warnings about unused parameters (void) devnam; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |