Commit 0899f58a by Takuya Ogawa

Merge branch 'contract/ttss/1.0.0_kim-ec' into contract/ttss/1.1.0

parents db31bce5 eaccfcfd
......@@ -5120,22 +5120,55 @@ CONTENTVIEW.flip = function(opt) {
context.translate(canvas.width/2,canvas.height/2);
context.rotate($(rotatebtnR).attr('angle')*Math.PI/180);
context.translate(-(canvas.width/2),-(canvas.height/2));
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top,
CONTENTVIEW.destRect.left, (canvas.height - height)/2, width, height);
let w = CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left;
let h = CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top;
try {
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, w, h,
CONTENTVIEW.destRect.left, (canvas.height - height)/2, width, height);
} catch (error) {
if(w > width) w = width;
if(h > height) h = height;
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, w, h,
CONTENTVIEW.destRect.left, (canvas.height - height)/2, width, height);
}
}else{
context.translate(canvas.width/2,canvas.height/2);
context.rotate($(rotatebtnR).attr('angle')*Math.PI/180);
context.translate(-(canvas.width/2),-(canvas.height/2));
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top,
CONTENTVIEW.destRect.left, CONTENTVIEW.destRect.top, width, height);
let w = CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left;
let h = CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top;
try {
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, w, h,
CONTENTVIEW.destRect.left, (canvas.height - height)/2, width, height);
} catch (error) {
if(w > width) w = width;
if(h > height) h = height;
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, w, h,
CONTENTVIEW.destRect.left, (canvas.height - height)/2, width, height);
}
}
}else{
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top,
CONTENTVIEW.destRect.left, CONTENTVIEW.destRect.top, width, height);
}
let w = CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left;
let h = CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top;
try {
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, w, h,
CONTENTVIEW.destRect.left, (canvas.height - height)/2, width, height);
} catch (error) {
if(w > width) w = width;
if(h > height) h = height;
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, w, h,
CONTENTVIEW.destRect.left, (canvas.height - height)/2, width, height);
}
}
context.restore();
}
else if(opt==2){
......@@ -5298,22 +5331,55 @@ CONTENTVIEW.flip = function(opt) {
context.translate(canvas.width/2,canvas.height/2);
context.rotate($(rotatebtnR).attr('angle')*Math.PI/180);
context.translate(-(canvas.width/2),-(canvas.height/2));
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top,
CONTENTVIEW.destRect.left, (canvas.height - height)/2, width, height);
let w = CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left;
let h = CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top;
try {
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, w, h,
CONTENTVIEW.destRect.left, (canvas.height - height)/2, width, height);
} catch (error) {
if(w > width) w = width;
if(h > height) h = height;
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, w, h,
CONTENTVIEW.destRect.left, (canvas.height - height)/2, width, height);
}
}else{
context.translate(canvas.width/2,canvas.height/2);
context.rotate($(rotatebtnR).attr('angle')*Math.PI/180);
context.translate(-(canvas.width/2),-(canvas.height/2));
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top,
CONTENTVIEW.destRect.left, CONTENTVIEW.destRect.top, width, height);
let w = CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left;
let h = CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top;
try {
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, w, h,
CONTENTVIEW.destRect.left, (canvas.height - height)/2, width, height);
} catch (error) {
if(w > width) w = width;
if(h > height) h = height;
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, w, h,
CONTENTVIEW.destRect.left, (canvas.height - height)/2, width, height);
}
}
}else{
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top,
CONTENTVIEW.destRect.left, CONTENTVIEW.destRect.top, width, height);
}
let w = CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left;
let h = CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top;
try {
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, w, h,
CONTENTVIEW.destRect.left, (canvas.height - height)/2, width, height);
} catch (error) {
if(w > width) w = width;
if(h > height) h = height;
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, w, h,
CONTENTVIEW.destRect.left, (canvas.height - height)/2, width, height);
}
}
context.restore();
}
......
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