From: <ai...@us...> - 2011-06-20 18:03:10
|
Revision: 11773 http://plplot.svn.sourceforge.net/plplot/?rev=11773&view=rev Author: airwin Date: 2011-06-20 18:03:03 +0000 (Mon, 20 Jun 2011) Log Message: ----------- Style previous changes. Modified Paths: -------------- trunk/bindings/qt_gui/plqt.cpp trunk/drivers/qt.cpp Modified: trunk/bindings/qt_gui/plqt.cpp =================================================================== --- trunk/bindings/qt_gui/plqt.cpp 2011-06-17 13:59:51 UTC (rev 11772) +++ trunk/bindings/qt_gui/plqt.cpp 2011-06-20 18:03:03 UTC (rev 11773) @@ -359,7 +359,7 @@ if ( pls->get_string_length ) { - pls->string_length = ((PLFLT) xOffset / picDpi) * 25.4; + pls->string_length = ( (PLFLT) xOffset / picDpi ) * 25.4; return; } @@ -884,27 +884,27 @@ if ( pls->get_string_length ) { PLUNICODE fci; - QPicture picText; - double picDpi; - PLUNICODE *text; + QPicture picText; + double picDpi; + PLUNICODE *text; plgfci( &fci ); - text = new PLUNICODE[txt->unicode_array_len]; - memcpy( text, txt->unicode_array, txt->unicode_array_len * sizeof ( PLUNICODE ) ); + text = new PLUNICODE[txt->unicode_array_len]; + memcpy( text, txt->unicode_array, txt->unicode_array_len * sizeof ( PLUNICODE ) ); picText = getTextPicture( fci, - text, - txt->unicode_array_len, - pls->chrht); - // - // I'm assuming that y_fact is 1.0 here, as it is impossible - // to know in advance (or so I believe). When the text is - // rendered "for real" it will be: pls->chrht * y_fact. - // - // Hazen 6/2011 - // - picDpi = picText.logicalDpiY(); - pls->string_length = ((PLFLT) xOffset / picDpi) * 25.4; - free(text); + text, + txt->unicode_array_len, + pls->chrht ); + // + // I'm assuming that y_fact is 1.0 here, as it is impossible + // to know in advance (or so I believe). When the text is + // rendered "for real" it will be: pls->chrht * y_fact. + // + // Hazen 6/2011 + // + picDpi = picText.logicalDpiY(); + pls->string_length = ( (PLFLT) xOffset / picDpi ) * 25.4; + free( text ); return; } Modified: trunk/drivers/qt.cpp =================================================================== --- trunk/drivers/qt.cpp 2011-06-17 13:59:51 UTC (rev 11772) +++ trunk/drivers/qt.cpp 2011-06-20 18:03:03 UTC (rev 11773) @@ -262,11 +262,11 @@ pls->dev_flush = 1; // Driver does not have a clear capability so use (good) PLplot core // fallback for that instead. - pls->dev_clear = 0; - pls->termin = 0; - pls->page = 0; - pls->dev_text = 1; // want to draw text - pls->dev_unicode = 1; // want unicode + pls->dev_clear = 0; + pls->termin = 0; + pls->page = 0; + pls->dev_text = 1; // want to draw text + pls->dev_unicode = 1; // want unicode pls->has_string_length = 1; // Driver supports string length calculations // Needs to be true only because of multi-stream case @@ -690,11 +690,11 @@ pls->dev_flush = 1; // Driver does not have a clear capability so use (good) PLplot core // fallback for that instead. - pls->dev_clear = 0; - pls->termin = 0; - pls->page = 0; - pls->dev_text = 1; // want to draw text - pls->dev_unicode = 1; // want unicode + pls->dev_clear = 0; + pls->termin = 0; + pls->page = 0; + pls->dev_text = 1; // want to draw text + pls->dev_unicode = 1; // want unicode pls->has_string_length = 1; // Driver supports string length calculations // Needs to be true only because of multi-stream case @@ -975,11 +975,11 @@ pls->dev_flush = 1; // Driver does not have a clear capability so use (good) PLplot core // fallback for that instead. - pls->dev_clear = 0; - pls->termin = 0; - pls->page = 0; - pls->dev_text = 1; // want to draw text - pls->dev_unicode = 1; // want unicode + pls->dev_clear = 0; + pls->termin = 0; + pls->page = 0; + pls->dev_text = 1; // want to draw text + pls->dev_unicode = 1; // want unicode pls->has_string_length = 1; // Driver supports string length calculations // QPrinter devices won't create if there is no QApplication declared... @@ -1287,10 +1287,10 @@ pls->dev_flush = 1; // Driver does not have a clear capability so use (good) PLplot core // fallback for that instead. - pls->dev_clear = 0; - pls->termin = 1; - pls->dev_text = 1; // want to draw text - pls->dev_unicode = 1; // want unicode + pls->dev_clear = 0; + pls->termin = 1; + pls->dev_text = 1; // want to draw text + pls->dev_unicode = 1; // want unicode pls->has_string_length = 1; // Driver supports string length calculations widget->setVisible( true ); @@ -1513,10 +1513,10 @@ pls->dev_flush = 1; // Driver does not have a clear capability so use (good) PLplot core // fallback for that instead. - pls->dev_clear = 0; - pls->termin = 0; - pls->dev_text = 1; // want to draw text - pls->dev_unicode = 1; // want unicode + pls->dev_clear = 0; + pls->termin = 0; + pls->dev_text = 1; // want to draw text + pls->dev_unicode = 1; // want unicode pls->has_string_length = 1; // Driver supports string length calculations } @@ -1708,11 +1708,11 @@ pls->dev_flush = 1; // Driver does not have a clear capability so use (good) PLplot core // fallback for that instead. - pls->dev_clear = 0; - pls->termin = 0; - pls->page = 0; - pls->dev_text = 1; // want to draw text - pls->dev_unicode = 1; // want unicode + pls->dev_clear = 0; + pls->termin = 0; + pls->page = 0; + pls->dev_text = 1; // want to draw text + pls->dev_unicode = 1; // want unicode pls->has_string_length = 1; // Driver supports string length calculations // Needs to be true only because of multi-stream case This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |