|
From: <and...@us...> - 2013-06-06 21:44:57
|
Revision: 12373
http://sourceforge.net/p/plplot/code/12373
Author: andrewross
Date: 2013-06-06 21:44:55 +0000 (Thu, 06 Jun 2013)
Log Message:
-----------
Style recent changes.
Modified Paths:
--------------
trunk/src/plbox.c
Modified: trunk/src/plbox.c
===================================================================
--- trunk/src/plbox.c 2013-06-06 21:44:33 UTC (rev 12372)
+++ trunk/src/plbox.c 2013-06-06 21:44:55 UTC (rev 12373)
@@ -1292,16 +1292,16 @@
if ( lgx )
{
if ( ldx )
- {
- pldtfac( vpwxmi, vpwxma, &factor, &tstart);
- tn = xtick1*( floor((vpwxmi-tstart )/xtick1 )) + tstart;
- }
- else
- {
- tn = xtick1*floor( vpwxmi / xtick1 );
- }
- for ( ; tn <= vpwxma; tn += xtick1 )
{
+ pldtfac( vpwxmi, vpwxma, &factor, &tstart );
+ tn = xtick1 * ( floor( ( vpwxmi - tstart ) / xtick1 ) ) + tstart;
+ }
+ else
+ {
+ tn = xtick1 * floor( vpwxmi / xtick1 );
+ }
+ for (; tn <= vpwxma; tn += xtick1 )
+ {
if ( lhx )
{
if ( llx )
@@ -1338,16 +1338,16 @@
if ( lgy )
{
if ( ldy )
- {
- pldtfac( vpwymi, vpwyma, &factor, &tstart);
- tn = ytick1*( floor((vpwymi-tstart )/ytick1 )) + tstart;
- }
- else
- {
- tn = ytick1*floor( vpwymi / ytick1 );
- }
- for ( ; tn <= vpwyma; tn += ytick1 )
{
+ pldtfac( vpwymi, vpwyma, &factor, &tstart );
+ tn = ytick1 * ( floor( ( vpwymi - tstart ) / ytick1 ) ) + tstart;
+ }
+ else
+ {
+ tn = ytick1 * floor( vpwymi / ytick1 );
+ }
+ for (; tn <= vpwyma; tn += ytick1 )
+ {
if ( lhy )
{
if ( lly )
@@ -1776,90 +1776,90 @@
pos = ( (PLLabelDefaults *) plsc->label_data )->exp_label_pos;
just = ( (PLLabelDefaults *) plsc->label_data )->exp_label_just;
}
- if ( lvy )
- {
- offset = 0.1; // more space to clear labels in "v" mode
- }
- else
- {
- offset = 0.02;
- }
- // Left axis exponent
- if ( lny )
- {
- if (!plsc->label_data)
- {
- height = 3.2;
- pos = 1.0 + offset;
- just = 0.5;
- }
- if ( plsc->if_boxbb )
- {
- // For horizontal axes, height of zero corresponds
- // to character centred on edge so should add 0.5
- // to height to obtain bounding box edge in
- // direction away from edge if no exponent. Add
- // an additional offset to make exponent fit.
- height_mm = ( height + 1.4 ) * char_height_mm;
- plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, plsc->vppyma /
- plsc->ypmm + height_mm );
- string_length_mm = plstrl( string );
- pos_mm = ( plsc->vppxmi + pos *
- ( plsc->vppxma - plsc->vppxmi ) ) /
- plsc->xpmm;
- plsc->boxbb_xmin = MIN( plsc->boxbb_xmin,
- pos_mm - string_length_mm );
- }
- else
- {
- if ( lvy )
- {
- plmtex( "lv", height, pos, just, string );
- }
- else
- {
- plmtex( "l", height, pos, just, string );
- }
- }
- }
- // Right axis exponent.
- if ( lmy )
- {
- if ( !plsc->label_data )
- {
- height = 3.4; // Extra space for superscript
- pos = 1.0 + offset;
- just = 0.5;
- }
- if ( plsc->if_boxbb )
- {
- // For horizontal axes, height of zero corresponds
- // to character centred on edge so should add 0.5
- // to height to obtain bounding box edge in
- // direction away from edge if no exponent. Add
- // an additional offset to make exponent fit.
- height_mm = ( height + 1.4 ) * char_height_mm;
- plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, plsc->vppyma /
- plsc->ypmm + height_mm );
- string_length_mm = plstrl( string );
- pos_mm = ( plsc->vppxmi + pos *
- ( plsc->vppxma - plsc->vppxmi ) ) /
- plsc->xpmm;
- plsc->boxbb_xmax = MAX( plsc->boxbb_xmin,
- pos_mm + string_length_mm );
- }
- else
- {
- if ( lvy )
- {
- plmtex( "rv", height, pos, just, string );
- }
- else
- {
- plmtex( "r", height, pos, just, string );
- }
+ if ( lvy )
+ {
+ offset = 0.1; // more space to clear labels in "v" mode
+ }
+ else
+ {
+ offset = 0.02;
+ }
+ // Left axis exponent
+ if ( lny )
+ {
+ if ( !plsc->label_data )
+ {
+ height = 3.2;
+ pos = 1.0 + offset;
+ just = 0.5;
}
+ if ( plsc->if_boxbb )
+ {
+ // For horizontal axes, height of zero corresponds
+ // to character centred on edge so should add 0.5
+ // to height to obtain bounding box edge in
+ // direction away from edge if no exponent. Add
+ // an additional offset to make exponent fit.
+ height_mm = ( height + 1.4 ) * char_height_mm;
+ plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, plsc->vppyma /
+ plsc->ypmm + height_mm );
+ string_length_mm = plstrl( string );
+ pos_mm = ( plsc->vppxmi + pos *
+ ( plsc->vppxma - plsc->vppxmi ) ) /
+ plsc->xpmm;
+ plsc->boxbb_xmin = MIN( plsc->boxbb_xmin,
+ pos_mm - string_length_mm );
+ }
+ else
+ {
+ if ( lvy )
+ {
+ plmtex( "lv", height, pos, just, string );
+ }
+ else
+ {
+ plmtex( "l", height, pos, just, string );
+ }
+ }
}
+ // Right axis exponent.
+ if ( lmy )
+ {
+ if ( !plsc->label_data )
+ {
+ height = 3.4; // Extra space for superscript
+ pos = 1.0 + offset;
+ just = 0.5;
+ }
+ if ( plsc->if_boxbb )
+ {
+ // For horizontal axes, height of zero corresponds
+ // to character centred on edge so should add 0.5
+ // to height to obtain bounding box edge in
+ // direction away from edge if no exponent. Add
+ // an additional offset to make exponent fit.
+ height_mm = ( height + 1.4 ) * char_height_mm;
+ plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, plsc->vppyma /
+ plsc->ypmm + height_mm );
+ string_length_mm = plstrl( string );
+ pos_mm = ( plsc->vppxmi + pos *
+ ( plsc->vppxma - plsc->vppxmi ) ) /
+ plsc->xpmm;
+ plsc->boxbb_xmax = MAX( plsc->boxbb_xmin,
+ pos_mm + string_length_mm );
+ }
+ else
+ {
+ if ( lvy )
+ {
+ plmtex( "rv", height, pos, just, string );
+ }
+ else
+ {
+ plmtex( "r", height, pos, just, string );
+ }
+ }
+ }
}
}
}
@@ -2332,89 +2332,89 @@
pos = ( (PLLabelDefaults *) plsc->label_data )->exp_label_pos;
just = ( (PLLabelDefaults *) plsc->label_data )->exp_label_just;
}
- if ( lvy )
- {
- offset = 0.1; // more space to clear labels in "v" mode
- }
- else
- {
- offset = 0.02;
- }
- // Left axis exponent.
- if ( lny )
- {
- if (!plsc->label_data)
- {
- height = 3.2;
- pos = 1.0 + offset;
- just = 0.5;
- }
- if ( plsc->if_boxbb )
- {
- // For horizontal axes, height of zero corresponds
- // to character centred on edge so should add 0.5
- // to height to obtain bounding box edge in
- // direction away from edge if no exponent. Add
- // an additional offset to make exponent fit.
- height_mm = ( height + 1.4 ) * char_height_mm;
- plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, plsc->vppyma /
- plsc->ypmm + height_mm );
- string_length_mm = plstrl( string );
- pos_mm = ( plsc->vppxmi + pos *
- ( plsc->vppxma - plsc->vppxmi ) ) /
- plsc->xpmm;
- plsc->boxbb_xmin = MIN( plsc->boxbb_xmin,
- pos_mm - string_length_mm );
- }
- else
- {
- if ( lvy )
- {
- plmtex( "lv", height, pos, just, string );
- }
- else
- {
- plmtex( "l", height, pos, just, string );
+ if ( lvy )
+ {
+ offset = 0.1; // more space to clear labels in "v" mode
+ }
+ else
+ {
+ offset = 0.02;
+ }
+ // Left axis exponent.
+ if ( lny )
+ {
+ if ( !plsc->label_data )
+ {
+ height = 3.2;
+ pos = 1.0 + offset;
+ just = 0.5;
+ }
+ if ( plsc->if_boxbb )
+ {
+ // For horizontal axes, height of zero corresponds
+ // to character centred on edge so should add 0.5
+ // to height to obtain bounding box edge in
+ // direction away from edge if no exponent. Add
+ // an additional offset to make exponent fit.
+ height_mm = ( height + 1.4 ) * char_height_mm;
+ plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, plsc->vppyma /
+ plsc->ypmm + height_mm );
+ string_length_mm = plstrl( string );
+ pos_mm = ( plsc->vppxmi + pos *
+ ( plsc->vppxma - plsc->vppxmi ) ) /
+ plsc->xpmm;
+ plsc->boxbb_xmin = MIN( plsc->boxbb_xmin,
+ pos_mm - string_length_mm );
+ }
+ else
+ {
+ if ( lvy )
+ {
+ plmtex( "lv", height, pos, just, string );
}
+ else
+ {
+ plmtex( "l", height, pos, just, string );
+ }
}
- }
- // Right axis exponent.
- if ( lmy )
- {
- if ( !plsc->label_data )
- {
- height = 3.4; // Extra space for superscript
- pos = 1.0 + offset;
- just = 0.5;
- }
- if ( plsc->if_boxbb )
- {
- // For horizontal axes, height of zero corresponds
- // to character centred on edge so should add 0.5
- // to height to obtain bounding box edge in
- // direction away from edge if no exponent. Add
- // an additional offset to make exponent fit.
- height_mm = ( height + 1.4 ) * char_height_mm;
- plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, plsc->vppyma /
- plsc->ypmm + height_mm );
- string_length_mm = plstrl( string );
- pos_mm = ( plsc->vppxmi + pos *
- ( plsc->vppxma - plsc->vppxmi ) ) /
- plsc->xpmm;
- plsc->boxbb_xmax = MAX( plsc->boxbb_xmin,
- pos_mm + string_length_mm );
- }
- else
- {
- if ( lvy )
- {
- plmtex( "rv", height, pos, just, string );
- }
- else
- {
- plmtex( "r", height, pos, just, string );
- }
+ }
+ // Right axis exponent.
+ if ( lmy )
+ {
+ if ( !plsc->label_data )
+ {
+ height = 3.4; // Extra space for superscript
+ pos = 1.0 + offset;
+ just = 0.5;
}
+ if ( plsc->if_boxbb )
+ {
+ // For horizontal axes, height of zero corresponds
+ // to character centred on edge so should add 0.5
+ // to height to obtain bounding box edge in
+ // direction away from edge if no exponent. Add
+ // an additional offset to make exponent fit.
+ height_mm = ( height + 1.4 ) * char_height_mm;
+ plsc->boxbb_ymax = MAX( plsc->boxbb_ymax, plsc->vppyma /
+ plsc->ypmm + height_mm );
+ string_length_mm = plstrl( string );
+ pos_mm = ( plsc->vppxmi + pos *
+ ( plsc->vppxma - plsc->vppxmi ) ) /
+ plsc->xpmm;
+ plsc->boxbb_xmax = MAX( plsc->boxbb_xmin,
+ pos_mm + string_length_mm );
+ }
+ else
+ {
+ if ( lvy )
+ {
+ plmtex( "rv", height, pos, just, string );
+ }
+ else
+ {
+ plmtex( "r", height, pos, just, string );
+ }
+ }
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|