private void calculateDimensionsGlobal( int cWidth, int cHeight )
	{
		imgWidth			= cWidth;
		imgHeight			= cHeight;

		if ( cWidth > 0 ) numPoints = cWidth;

		// Padding depends on grid visibility
		chart_lpadding 		= ( graphDef.showMajorGridY() ? graphDef.getChartLeftPadding() : CHART_LPADDING_NM );
		chart_bpadding 		= ( graphDef.showMajorGridX() ? CHART_BPADDING : CHART_BPADDING_NM );

		// Size of all lines below chart
		commentBlock		= 0;
		if ( graphDef.showLegend() )
			commentBlock 	= graphDef.getCommentLineCount() * (nfont_height + LINE_PADDING) - LINE_PADDING;

		// x_offset and y_offset define the starting corner of the actual graph
		x_offset			= LBORDER_SPACE;
		if ( graphDef.getVerticalLabel() != null )
			x_offset 		+= nfont_height + LINE_PADDING;
		chartWidth			= imgWidth - x_offset - RBORDER_SPACE - chart_lpadding - CHART_RPADDING;

		y_offset			= UBORDER_SPACE;
		if ( graphDef.getTitle() != null )			// Title *always* gets a extra LF automatically
			y_offset		+= ((tfont_height + LINE_PADDING) * graphDef.getTitle().getLineCount() + tfont_height) + LINE_PADDING;
		chartHeight 		= imgHeight - commentBlock - y_offset - BBORDER_SPACE - CHART_UPADDING - CHART_BPADDING;
	}