在HTML5中可以使用strokeRect()方法绘制带边框的矩形,语法结构为strokeRect(x, y, width, height),其中x和y规定了矩形( )的坐标位置。
A: 左上角
B: 右上角
C: 右下角
D: 左下角
A: 左上角
B: 右上角
C: 右下角
D: 左下角
举一反三
- 函数strokeRect(x,y,w,h)中坐标(x,y)表示绘制矩形的哪个顶点位置? A: 左上角顶点 B: 右上角顶点 C: 左下角顶点 D: 右下角顶点
- 在HTML5中,Canvas绘制矩形相关的方法不包含( )? A: fillRect(x, y, width, height) B: ptRect(x, y, width, height) C: strokeRect(x, y, width, height) D: clearRect(x, y, width, height)
- 下列选项中,关于“context.strokeRect(x,y,width,height);/” 语法参数的描述,正确的是() A: x、y代表矩形形起点相对浏览器左上角的横纵坐标 B: x、y代表矩形起点的横纵坐标 C: width和height代表要绘制矩形距离浏览器左上角的宽和高 D: width和height代表要绘制矩形的宽和高
- 矩形的结构是Rectangle(x,y,w,h),这里的x,y 表示的是__________。 A: 矩形中心点坐标 B: 矩形右上角的坐标 C: 矩形左下角的坐标 D: 矩形左上角的坐标
- 代码strokeRect(10, 50, 100, 30)表示绘制带边框的空心矩形,矩形左上角的坐标位置为(10,50),矩形的宽度为100px,矩形的高度为30px。