Commit fe1a1dca authored by Alexander.Trofimov's avatar Alexander.Trofimov

delete 'glass'

delete strokedCurvyRect
delete unused code

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51834 954022d7-b5bf-4e40-9824-e11837661b57
parent 9f181447
......@@ -599,15 +599,10 @@
this.context.stroke();
// Regular bar
} else if (variant == 'bar' || variant == '3d' || variant == 'glass' || variant == 'bevel') {
} else if (variant == 'bar' || variant == '3d' || variant == 'bevel') {
if (variant == 'glass') {
OfficeExcel.filledCurvyRect(this.context, x + hmargin, y, barWidth, height, 3, this.data[i] > 0, this.data[i] > 0, this.data[i] < 0, this.data[i] < 0);
OfficeExcel.strokedCurvyRect(this.context, x + hmargin, y, barWidth, height, 3, this.data[i] > 0, this.data[i] > 0, this.data[i] < 0, this.data[i] < 0);
} else {
this.context.strokeRect(x + hmargin, y, barWidth, height);
this.context.fillRect(x + hmargin, y, barWidth, height);
}
// 3D effect
if (variant == '3d') {
......@@ -665,23 +660,6 @@
this.context.strokeStyle = prevStrokeStyle;
this.context.fillStyle = prevFillStyle;
// Glass variant
} else if (variant == 'glass') {
var grad = this.context.createLinearGradient(
x + hmargin,
y,
x + hmargin + (barWidth / 2),
y
);
grad.addColorStop(0, 'rgba(255,255,255,0.9)');
grad.addColorStop(1, 'rgba(255,255,255,0.5)');
this.context.beginPath();
this.context.fillStyle = grad;
this.context.fillRect(x + hmargin + 2,y + (this.data[i] > 0 ? 2 : 0),(barWidth / 2) - 2,height - 2);
this.context.fill();
}
// This bit draws the text labels that appear above the bars if requested
......
......@@ -75,9 +75,6 @@ OfficeExcel.OtherProps = function()
this._colors_reverse = false;
this._colors_alternate = null;
this._title_yaxis_align = 'left';
this._title_yaxis_position = 'left';
this._radius = null;
this._exploded = 0;
......
......@@ -2466,70 +2466,6 @@ if (typeof(obj._otherProps._scale_formatter) == 'function') {
}
}
/**
* Draws a rectangle with curvy corners
*
* @param context object The context
* @param x number The X coordinate (top left of the square)
* @param y number The Y coordinate (top left of the square)
* @param w number The width of the rectangle
* @param h number The height of the rectangle
* @param number The radius of the curved corners
* @param boolean Whether the top left corner is curvy
* @param boolean Whether the top right corner is curvy
* @param boolean Whether the bottom right corner is curvy
* @param boolean Whether the bottom left corner is curvy
*/
OfficeExcel.strokedCurvyRect = function (context, x, y, w, h)
{
// The corner radius
var r = arguments[5] ? arguments[5] : 3;
// The corners
var corner_tl = (arguments[6] || arguments[6] == null) ? true : false;
var corner_tr = (arguments[7] || arguments[7] == null) ? true : false;
var corner_br = (arguments[8] || arguments[8] == null) ? true : false;
var corner_bl = (arguments[9] || arguments[9] == null) ? true : false;
context.beginPath();
// Top left side
context.moveTo(x + (corner_tl ? r : 0), y);
context.lineTo(x + w - (corner_tr ? r : 0), y);
// Top right corner
if (corner_tr) {
context.arc(x + w - r, y + r, r, Math.PI * 1.5, Math.PI * 2, false);
}
// Top right side
context.lineTo(x + w, y + h - (corner_br ? r : 0) );
// Bottom right corner
if (corner_br) {
context.arc(x + w - r, y - r + h, r, Math.PI * 2, Math.PI * 0.5, false);
}
// Bottom right side
context.lineTo(x + (corner_bl ? r : 0), y + h);
// Bottom left corner
if (corner_bl) {
context.arc(x + r, y - r + h, r, Math.PI * 0.5, Math.PI, false);
}
// Bottom left side
context.lineTo(x, y + (corner_tl ? r : 0) );
// Top left corner
if (corner_tl) {
context.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5, false);
}
context.stroke();
}
/**
* Draws a filled rectangle with curvy corners
*
......
......@@ -127,7 +127,7 @@
}
}
heigthTextKey = 24;
var heigthTextKey = 24;
if(key && key.length != 0)
{
var props = getMaxPropertiesText(drwContext,font,bar._otherProps._key);
......@@ -136,12 +136,6 @@
var heightKeyVer = key.length*heigthTextKey;
var heightKey = 24;
var widthKey = textWidth*key.length + key.length*30 + 11*(key.length-1);
//var widthKeyVer = textWidth + 30;
var widthKeyVer = 61;
//var margin = obj._chartGutter._top - 14;
if (typeof(obj._otherProps._key_halign) == 'string') {
if (obj._otherProps._key_halign == 'left') {
hpos = calculatePosiitionObjects("key_hpos");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment