Skip to content

Commit 34d979b

Browse files
authored
chore(api): Remove screenshots from EmbedLiveSample calls (#32505)
* chore(api): Remove screenshots from EmbedLiveSample calls * chore(api): Remove screenshots from EmbedLiveSample calls
1 parent 490d3ce commit 34d979b

27 files changed

+22
-22
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.

files/en-us/web/api/canvas_api/tutorial/applying_styles_and_colors/index.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ draw();
6464

6565
The result looks like this:
6666

67-
{{EmbedLiveSample("A_fillStyle_example", 160, 160, "canvas_fillstyle.png")}}
67+
{{EmbedLiveSample("A_fillStyle_example", "", "160")}}
6868

6969
### A `strokeStyle` example
7070

@@ -96,7 +96,7 @@ draw();
9696

9797
The result looks like this:
9898

99-
{{EmbedLiveSample("A_strokeStyle_example", "180", "180", "canvas_strokestyle.png")}}
99+
{{EmbedLiveSample("A_strokeStyle_example", "", "160")}}
100100

101101
## Transparency
102102

@@ -156,7 +156,7 @@ function draw() {
156156
draw();
157157
```
158158

159-
{{EmbedLiveSample("A_globalAlpha_example", "180", "180", "canvas_globalalpha.png")}}
159+
{{EmbedLiveSample("A_globalAlpha_example", "", "160")}}
160160

161161
### An example using `rgb()` with alpha transparency
162162

@@ -194,7 +194,7 @@ function draw() {
194194
draw();
195195
```
196196

197-
{{EmbedLiveSample("An_example_using_rgb_with_alpha_transparency", "180", "180", "canvas_rgb.png")}}
197+
{{EmbedLiveSample("An_example_using_rgb_with_alpha_transparency", "", "160")}}
198198

199199
## Line styles
200200

@@ -246,7 +246,7 @@ function draw() {
246246
draw();
247247
```
248248

249-
{{EmbedLiveSample("A_lineWidth_example", "180", "180", "canvas_linewidth.png")}}
249+
{{EmbedLiveSample("A_lineWidth_example", "", "160")}}
250250

251251
Obtaining crisp lines requires understanding how paths are stroked. In the images below, the grid represents the canvas coordinate grid. The squares between gridlines are actual on-screen pixels. In the first grid image below, a rectangle from (2,1) to (5,5) is filled. The entire area between them (light red) falls on pixel boundaries, so the resulting filled rectangle will have crisp edges.
252252

@@ -313,7 +313,7 @@ function draw() {
313313
draw();
314314
```
315315

316-
{{EmbedLiveSample("A_lineCap_example", "180", "180", "Canvas_linecap.png")}}
316+
{{EmbedLiveSample("A_lineCap_example", "", "160")}}
317317

318318
### A `lineJoin` example
319319

@@ -355,7 +355,7 @@ function draw() {
355355
draw();
356356
```
357357

358-
{{EmbedLiveSample("A_lineJoin_example", "180", "180", "Canvas_linejoin.png")}}
358+
{{EmbedLiveSample("A_lineJoin_example", "", "160")}}
359359

360360
### A demo of the `miterLimit` property
361361

@@ -436,7 +436,7 @@ document.getElementById("miterLimit").value = document
436436
draw();
437437
```
438438

439-
{{EmbedLiveSample("A_demo_of_the_miterLimit_property", "400", "180", "canvas_miterlimit.png")}}
439+
{{EmbedLiveSample("A_demo_of_the_miterLimit_property", "", "180")}}
440440

441441
### Using line dashes
442442

@@ -471,7 +471,7 @@ function march() {
471471
march();
472472
```
473473

474-
{{EmbedLiveSample("Using_line_dashes", "120", "120", "marching-ants.png")}}
474+
{{EmbedLiveSample("Using_line_dashes")}}
475475

476476
## Gradients
477477

@@ -545,7 +545,7 @@ The first is a background gradient. As you can see, we assigned two colors at th
545545

546546
In the second gradient, we didn't assign the starting color (at position 0.0) since it wasn't strictly necessary, because it will automatically assume the color of the next color stop. Therefore, assigning the black color at position 0.5 automatically makes the gradient, from the start to this stop, black.
547547

548-
{{EmbedLiveSample("A_createLinearGradient_example", "180", "180", "canvas_lineargradient.png")}}
548+
{{EmbedLiveSample("A_createLinearGradient_example", "", "160")}}
549549

550550
### A `createRadialGradient` example
551551

@@ -600,7 +600,7 @@ In this case, we've offset the starting point slightly from the end point to ach
600600

601601
The last color stop in each of the four gradients uses a fully transparent color. If you want to have a nice transition from this to the previous color stop, both colors should be equal. This isn't very obvious from the code because it uses two different CSS color methods as a demonstration, but in the first gradient `#019F62 = rgb(1 159 98 / 100%)`.
602602

603-
{{EmbedLiveSample("A_createRadialGradient_example", "180", "180", "canvas_radialgradient.png")}}
603+
{{EmbedLiveSample("A_createRadialGradient_example", "", "160")}}
604604

605605
### A `createConicGradient` example
606606

@@ -648,7 +648,7 @@ The first gradient is positioned in the center of the first rectangle and moves
648648

649649
The second gradient is also positioned at the center of it's second rectangle. This one has multiple color stops, alternating from black to white at each quarter of the rotation. This gives us the checkered effect.
650650

651-
{{EmbedLiveSample("A_createConicGradient_example", "180", "180", "canvas_conicgrad.png")}}
651+
{{EmbedLiveSample("A_createConicGradient_example", "", "160")}}
652652

653653
## Patterns
654654

@@ -706,7 +706,7 @@ function draw() {
706706
draw();
707707
```
708708

709-
{{EmbedLiveSample("A_createPattern_example", "180", "180", "canvas_createpattern.png")}}
709+
{{EmbedLiveSample("A_createPattern_example", "", "160")}}
710710

711711
## Shadows
712712

@@ -756,7 +756,7 @@ function draw() {
756756
draw();
757757
```
758758

759-
{{EmbedLiveSample("A_shadowed_text_example", "180", "100", "shadowed-string.png")}}
759+
{{EmbedLiveSample("A_shadowed_text_example")}}
760760

761761
We will look at the `font` property and `fillText` method in the next chapter about [drawing text](/en-US/docs/Web/API/Canvas_API/Tutorial/Drawing_text).
762762

@@ -791,6 +791,6 @@ function draw() {
791791
draw();
792792
```
793793

794-
{{EmbedLiveSample("Canvas_fill_rules", "110", "110", "fill-rule.png")}}
794+
{{EmbedLiveSample("Canvas_fill_rules")}}
795795

796796
{{PreviousNext("Web/API/Canvas_API/Tutorial/Drawing_shapes", "Web/API/Canvas_API/Tutorial/Drawing_text")}}
Binary file not shown.
Binary file not shown.
Binary file not shown.

files/en-us/web/api/canvas_api/tutorial/compositing/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ In the first few lines of code, we draw a black rectangle the size of the canvas
101101

102102
Everything that's drawn after creating the clipping path will only appear inside that path. You can see this clearly in the linear gradient that's drawn next. After this a set of 50 randomly positioned and scaled stars is drawn, using the custom `drawStar()` function. Again the stars only appear inside the defined clipping path.
103103

104-
{{EmbedLiveSample("A_clip_example", "180", "190", "canvas_clip.png")}}
104+
{{EmbedLiveSample("A_clip_example", "", "160")}}
105105

106106
### Inverse clipping path
107107

@@ -177,6 +177,6 @@ function drawStar(ctx, r) {
177177
draw();
178178
```
179179

180-
{{EmbedLiveSample("Hole_in_rectangle", 160, 160, "inverse_clipping_path.png")}}
180+
{{EmbedLiveSample("Hole_in_rectangle", "", "160")}}
181181

182182
{{PreviousNext("Web/API/Canvas_API/Tutorial/Transformations", "Web/API/Canvas_API/Tutorial/Basic_animations")}}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

files/en-us/web/api/canvas_api/tutorial/transformations/index.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ So far this is pretty similar to what we've done in previous sections. However o
8282

8383
When the second `restore()` statement is called, the original state (the one we set up before the first call to `save`) is restored and the last rectangle is once again drawn in black.
8484

85-
{{EmbedLiveSample("A_save_and_restore_canvas_state_example", "180", "190", "canvas_savestate.png")}}
85+
{{EmbedLiveSample("A_save_and_restore_canvas_state_example", "", "160")}}
8686

8787
## Translating
8888

@@ -124,7 +124,7 @@ function draw() {
124124
draw();
125125
```
126126

127-
{{EmbedLiveSample("A_translate_example", "160", "190", "translate.png")}}
127+
{{EmbedLiveSample("A_translate_example")}}
128128

129129
## Rotating
130130

@@ -185,7 +185,7 @@ To rotate the rectangle around its own center, we translate the canvas to the ce
185185
draw();
186186
```
187187

188-
{{EmbedLiveSample("A_rotate_example", "310", "260", "rotate.png")}}
188+
{{EmbedLiveSample("A_rotate_example", "", "160")}}
189189

190190
## Scaling
191191

@@ -227,7 +227,7 @@ function draw() {
227227
draw();
228228
```
229229

230-
{{EmbedLiveSample("A_scale_example", "160", "190", "scale.png")}}
230+
{{EmbedLiveSample("A_scale_example", "", "160")}}
231231

232232
## Transforms
233233

@@ -291,6 +291,6 @@ function draw() {
291291
draw();
292292
```
293293

294-
{{EmbedLiveSample("Example_for_transform_and_setTransform", "230", "290", "canvas_transform.png")}}
294+
{{EmbedLiveSample("Example_for_transform_and_setTransform", "", "160")}}
295295

296296
{{PreviousNext("Web/API/Canvas_API/Tutorial/Using_images", "Web/API/Canvas_API/Tutorial/Compositing")}}
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)