Commit 905c1f70 by doszhang

dos

parent a89097c5
...@@ -458,52 +458,54 @@ function createPoster() { ...@@ -458,52 +458,54 @@ function createPoster() {
createList('.poster-list-page .poster-list', flagStack[i], i + 1, wrapNum); createList('.poster-list-page .poster-list', flagStack[i], i + 1, wrapNum);
} }
// let flagListHeight = $('.poster-list-page .poster-list').height(); //计算海报中部高度
// flagListHeight = (flagListHeight / fontSize) * 20; let flagListHeight = $('.poster-list-page .poster-list').height();
// flagListHeight = flagListHeight + 20; flagListHeight = (flagListHeight / fontSize) * 20;
// let topHalfHeight = 489; flagListHeight = flagListHeight + 20;
// let bottomHalfHeight = 368; let topHalfHeight = 390;
// let posterCanvasHeight = 0; let bottomHalfHeight = 207;
// flagListHeight = flagListHeight + 60; let posterCanvasHeight = 0;
flagListHeight = flagListHeight + 60;
// if (flagListHeight < 383) {
// posterCanvasHeight = topHalfHeight + 383 + bottomHalfHeight; //计算海报总高度
// flagListHeight = 383; if (flagListHeight < 400) {
// } else { posterCanvasHeight = topHalfHeight + 400 + bottomHalfHeight;
// posterCanvasHeight = topHalfHeight + flagListHeight + bottomHalfHeight; flagListHeight = 400;
// } } else {
posterCanvasHeight = topHalfHeight + flagListHeight + bottomHalfHeight;
}
// $('#posterCanvas').remove();
// canvasinfo = initCanvas('.poster-canvas-block', 'posterCanvas', 640 * 2, posterCanvasHeight * 2, true);
// posterCanvas = canvasinfo[0];
// posterCtx = canvasinfo[1];
// $('#posterCanvas').css('height', pxToRem(posterCanvasHeight)); //创建海报canvas
$('#posterCanvas').remove();
canvasinfo = initCanvas('.poster-canvas-block', 'posterCanvas', 640 * 2, posterCanvasHeight * 2, true);
posterCanvas = canvasinfo[0];
posterCtx = canvasinfo[1];
$('#posterCanvas').css('height', pxToRem(posterCanvasHeight));
// posterCtx.fillStyle = bgColor; //画海报背景色
// posterCtx.fillRect(0, 0, posterCanvas.width, posterCanvas.height); posterCtx.fillStyle = bgColor;
posterCtx.fillRect(0, 0, posterCanvas.width, posterCanvas.height);
// //45 107 // //45 107
// let topHalf = new Image(); let topHalf = new Image();
// topHalf.src = "/Public/static/image2/poster-tophalf.png"; topHalf.src = "/Public/static/image2/poster-tophalf.png";
// topHalf.onload = function () { topHalf.onload = function () {
// //画海报上半部分 //画海报上半部分
// posterCtx.drawImage(topHalf, pxToRem(45 * 2), pxToRem(107 * 2), pxToRem(550 * 2), pxToRem(350 * 2)); posterCtx.drawImage(topHalf, pxToRem(45 * 2), pxToRem(107 * 2), pxToRem(550 * 2), pxToRem(350 * 2));
// posterCtx.save(); posterCtx.save();
// posterCtx.restore(); posterCtx.restore();
// //画海报中部背景 //画海报中部背景
// posterCtx.fillStyle = '#ffffff'; posterCtx.fillStyle = '#ffffff';
// posterCtx.fillRect(pxToRem(45 * 2), pxToRem(488 * 2), pxToRem(550 * 2), pxToRem(flagListHeight * 2)); posterCtx.fillRect(pxToRem(45 * 2), pxToRem(488 * 2), pxToRem(550 * 2), pxToRem(flagListHeight * 2));
// posterCtx.save(); posterCtx.save();
// posterCtx.restore(); posterCtx.restore();
// //画海报底部 //画海报底部
// let bottomHalf = new Image(); let bottomHalf = new Image();
// bottomHalf.src = "/Public/static/image2/poster-bottomhalf.png"; bottomHalf.src = "/Public/static/image2/poster-bottomhalf.png";
// bottomHalf.onload = function () { bottomHalf.onload = function () {
// bottomHalfTop = pxToRem(487) + pxToRem(flagListHeight); bottomHalfTop = pxToRem(487) + pxToRem(flagListHeight);
// $('.poster-tip').css('top', bottomHalfTop + pxToRem(181)); $('.poster-tip').css('top', bottomHalfTop + pxToRem(181));
// posterCtx.drawImage(bottomHalf, pxToRem(45 * 2), bottomHalfTop * 2, pxToRem(550 * 2), pxToRem(207 * 2)); posterCtx.drawImage(bottomHalf, pxToRem(45 * 2), bottomHalfTop * 2, pxToRem(550 * 2), pxToRem(207 * 2));
// drawFlagItem(pxToRem(489 + 20)); // drawFlagItem(pxToRem(489 + 20));
// let decorate = new Image(); // let decorate = new Image();
// decorate.src = checkedDecorate; // decorate.src = checkedDecorate;
...@@ -516,8 +518,8 @@ function createPoster() { ...@@ -516,8 +518,8 @@ function createPoster() {
// }, 1000); // }, 1000);
// } // }
// } }
// } }
} }
......
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 sign in to comment