음.. 해보려는데 잘 안된다?

먼저 CSS를 통해서 사이즈가 정해져 있는데

canvas.width로 하고 이미지를 써올려 보니 커진다.. -_-


var canvas = document.getElementById("canvas"),

    ctx = canvas.getContext("2d");


canvas.width = 600;

canvas.height = 300;

and then change its displayed size using css


#canvas{

   width: 300px;

   height: 150px; 

}​ 

[링크 : https://stackoverflow.com/questions/9742131/scaling-canvas-element-with-static-resolution]


[링크 : https://www.html5canvastutorials.com/advanced/html5-canvas-transform-scale-tutorial/]

[링크 : https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/scale]

[링크 : https://www.w3schools.com/tags/canvas_scale.asp]

'Programming > javascript & HTML' 카테고리의 다른 글

canvas 이미지 품질 저하  (0) 2018.11.06
자바스크립트 절대값 abs()  (0) 2018.11.05
js array keys(),values()  (0) 2018.10.31
js eval  (0) 2018.10.30
js split \n ' '  (0) 2018.10.26
Posted by 구차니
Programming/angular2018. 11. 2. 19:30

'Programming > angular' 카테고리의 다른 글

angular 빌드 최적화(?)  (0) 2019.03.18
angular with reverse proxy  (0) 2019.03.18
angular4 ie11 호환성 설정  (0) 2019.02.18
vscode 및 angular.js 셋팅..  (0) 2018.08.08
Posted by 구차니

의외로 싱겁네 -_-

콘솔에서 자주 이용하는데 매번 너무 길게 나와서 불편했는데..


[링크 : https://stackoverflow.com/.../how-to-show-git-log-history-for-a-sub-directory-of-a-git-repo]

'프로그램 사용 > Version Control' 카테고리의 다른 글

git 윈도우 자격증명 관리  (0) 2019.01.16
git tag  (0) 2018.12.07
.gitignore  (0) 2018.10.22
git 리비전 이동 후 pull 안되는 문제  (0) 2018.10.22
git 리비전 돌아 다니기  (0) 2018.10.18
Posted by 구차니