Commit f3dc2f5c by Kim Eunchul

#41178【課題5】[TTSSBiz Web]PDF閲覧時障害

parent 47588246
......@@ -5120,20 +5120,32 @@ 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));
let w = CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left;
let h = CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top;
if(w > width) w = width;
if(h > height) h = height;
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top,
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));
let w = CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left;
let h = CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top;
if(w > width) w = width;
if(h > height) h = height;
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, w, h,
CONTENTVIEW.destRect.left, CONTENTVIEW.destRect.top, width, height);
}
}else{
let w = CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left;
let h = CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top;
if(w > width) w = width;
if(h > height) h = height;
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, w, h,
CONTENTVIEW.destRect.left, CONTENTVIEW.destRect.top, width, height);
}
context.restore();
......@@ -5298,20 +5310,32 @@ 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));
let w = CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left;
let h = CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top;
if(w > width) w = width;
if(h > height) h = height;
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top,
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));
let w = CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left;
let h = CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top;
if(w > width) w = width;
if(h > height) h = height;
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, w, h,
CONTENTVIEW.destRect.left, CONTENTVIEW.destRect.top, width, height);
}
}else{
let w = CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left;
let h = CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top;
if(w > width) w = width;
if(h > height) h = height;
context.drawImage(offscreen,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, CONTENTVIEW.srcRect.right - CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.bottom - CONTENTVIEW.srcRect.top,
CONTENTVIEW.srcRect.left, CONTENTVIEW.srcRect.top, w, h,
CONTENTVIEW.destRect.left, CONTENTVIEW.destRect.top, width, height);
}
......
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