//Debug.write("startLine ",this.startx,this.starty); if (oid_name == null) { oid_name = 'line' + this.getCounter() } this.currentlayer = new lz.drawViewNew(this, { name : oid_name, width : this.width + 2, height : this.height + 2, x : -1, y : -1, opacity : this.currentlineOpacity }); this.drawlineOnObject(this.currentlayer, -1, -1, 0, 0); this.drawlineOnObject(this.currentlayer, this.width, this.height, this.width + 1, this.height + 1); //Set previous to null this.prevx = null; this.prevy = null; currentlayer.strokeStyle = this.currentlinestroke; currentlayer.lineWidth = this.currentlinelineWidth; //currentlayer.fillstyle = '0x000000'; ////Debug.write("endLine",this.startx,this.starty,this.endx,this.endy); maxx) maxx = this.startx; if (this.endx > maxx) maxx = this.endx; if (this.starty < miny) miny = this.starty; if (this.endy < miny) miny = this.endy; if (this.starty > maxy) maxy = this.starty; if (this.endy > maxy) maxy = this.endy; var width = maxx - minx; var height = maxy - miny; var x1 = this.startx - minx + (this.currentlinelineWidth / 2); var y1 = this.starty - miny + (this.currentlinelineWidth / 2); var x2 = this.endx - minx + (this.currentlinelineWidth / 2); var y2 = this.endy - miny + (this.currentlinelineWidth / 2); if (this.isSnapToGrid) { xgrid = Math.round((minx - 1 - (this.currentlinelineWidth / 2)) / this.gridWidth) * this.gridWidth; ygrid = Math.round((miny - 1 - (this.currentlinelineWidth / 2)) / this.gridWidth) * this.gridWidth; this.currentlayer = new lz.drawViewNew(this, { name : tempName, x : xgrid, y : ygrid, width : (width + this.currentlinelineWidth), height : (height + this.currentlinelineWidth), opacity : this.currentlineOpacity }); } else { this.currentlayer = new lz.drawViewNew(this, { name : tempName, x : (minx - 1 - (this.currentlinelineWidth / 2)), y : (miny - 1 - (this.currentlinelineWidth / 2)), width : (width + this.currentlinelineWidth), height : (height + this.currentlinelineWidth), opacity : this.currentlineOpacity }); } //this.currentlayer.fillstyle = '0x000000'; this.currentlayer.lineWidth = this.currentlinelineWidth; this.currentlayer.strokeStyle = this.currentlinestroke; this.drawline((x1), (y1), (x2), (y2)); //Add Layer to global Layer this.layers.push(this.currentlayer); this.lineregisterFinal(this.currentlayer.name, this.currentlinestroke, this.currentlinelineWidth, this.currentlineOpacity, this.currentlayer.x, this.currentlayer.y, this.currentlayer.width, this.currentlayer.height, x1, y1, x2, y2, true, this .getSWFDocumentStatus(), this.getZIndex()); ]]> var actionObject = new Array(); actionObject[0] = 'line'; actionObject[1] = stroke; actionObject[2] = line; actionObject[3] = opacity; actionObject[4] = x1 actionObject[5] = y1; actionObject[6] = x2; actionObject[7] = y2; actionObject[8] = zIndex;//-8 actionObject[9] = swfObj;//-7 actionObject[10] = this.counter;//-6 actionObject[11] = x;//-5 actionObject[12] = y;//-4 actionObject[13] = width;//-3 actionObject[14] = height;//-2 actionObject[15] = newName;//-1 this.baseactionobjectList.push(actionObject); if (doCall) this.onsharedMessage('draw', actionObject);