Skip to content

Commit

Permalink
Improve background image. Remove unnecessary cleartype test.
Browse files Browse the repository at this point in the history
  • Loading branch information
wrandelshofer committed Aug 16, 2024
1 parent e4a2b48 commit f77de2a
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
Binary file removed doc/assets/testimage/Cleartype_SubSampleCenter.png
Binary file not shown.
Binary file removed doc/assets/testimage/SubpixelAntialiasing.png
Binary file not shown.
11 changes: 6 additions & 5 deletions doc/assets/testimage/VideoCodecTestImage.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@
<Rectangle bounds="624 440 8 8"
fill="linear-gradient(from 0 0 to 0 4, repeat, #ff0000 25%, #00ff00 25%, #00ff00 50%, #0000ff 50%, #0000ff 75%, #000000 75%)"
id="rectangle5" stroke="none"/>
<TextArea bounds="520 251 120 53" fill="none" font="8 Pixel Operator \38 " id="textarea6" lineSpacing="2"
<TextArea bounds="520 251 120 109" fill="none" font="8 Pixel Operator \38 " id="textarea6" lineSpacing="2"
stroke="none"
text="The Quick Brown Fox Jumps Over the Lazy Dog. THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG."
text="The Quick Brown Fox Jumps Over the Lazy Dog. THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG. The Quick Brown Fox Jumps Over the Lazy Dog. THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG."
textFill="#000000"/>
<TextArea bounds="472 251 32 8" fill="none" font="8 Pixel Operator \38 " id="textarea1" lineSpacing="1"
stroke="none" text="red" textFill="#ff0000"/>
Expand Down Expand Up @@ -137,11 +137,12 @@
<Rectangle bounds="472 120 168 10" fill="#000000" id="rectangle14" stroke="none"/>
<TextArea bounds="472 120 72 8" fill="none" font="8 Pixel Operator \38 " id="textarea13" lineSpacing="1"
stroke="none" text="Photo" textFill="#ffffff"/>
<TextArea bounds="520 303 120 57" fill="none" font="13 Arial" id="textarea14" lineSpacing="2" padding="2 0"
stroke="none" text="the quick brown fox jumps over the lazy dog THE QUICK" textFill="#000000"/>
<Image bounds="519 306 120 56" id="image2" src="SubpixelAntialiasing.png"/>
<Rectangle bounds="472 360 168 10" fill="#000000" id="rectangle15" stroke="none"/>
<TextArea bounds="472 360 168 8" fill="none" font="8 Pixel Operator \38 " id="textarea12" lineSpacing="1"
stroke="none" text="Colors" textFill="#ffffff"/>
<Rectangle bounds="472 0 168 120" id="rectangle19" stroke="none"/>
<Rectangle bounds="472 0 168 10" fill="#000000" id="rectangle20" stroke="none"/>
<TextArea bounds="472 0 112 8" fill="none" font="8 Pixel Operator \38 " id="textarea14" lineSpacing="1"
stroke="none" text="Video Frame" textFill="#ffffff"/>
</Layer>
</Drawing>
11 changes: 0 additions & 11 deletions doc/assets/testimage/third-party-licenses.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,13 @@ private static BufferedImage createImage(Format format) {
return img;
}

private static void drawAnimationFrame(BufferedImage img, Graphics2D g, double second) {
private static void drawAnimationFrame(BufferedImage img, Graphics2D g, double second, int frameIndex, int frameCount) {
drawClock(g, 232, 240, 150, second);

g.setPaint(Color.WHITE);
g.fillRect(472, 10, 168, 110);
g.setPaint(Color.BLACK);
g.drawString("Frame " + (frameIndex + 1) + " of " + frameCount, 473, 24);
}

private static void drawClock(Graphics2D g, int cx, int cy, int radius, double seconds) {
Expand Down Expand Up @@ -211,7 +216,7 @@ private static void testWriting(File file, Format format) throws IOException {
// Draw the animation
for (int i = 0, n = frameRate.multiply(60).intValue(); i < n; i++) {
double t = frameRate.divide(i).doubleValue() + 8 * 3600 + 25 * 60;
drawAnimationFrame(img, g, t);
drawAnimationFrame(img, g, t, i, n);

// write image to the writer
out.write(0, img, 1);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ private static void testWriting(File file, Format format) throws IOException {
// Draw the animation
for (int i = 0, n = frameRate.multiply(60).intValue(); i < n; i++) {
double t = frameRate.divide(i).doubleValue() + 8 * 3600 + 25 * 60;
drawAnimationFrame(img, g, t);
drawAnimationFrame(img, g, t, i, n);

// write image to the writer
out.write(0, img, 1);
Expand All @@ -133,8 +133,13 @@ private static void testWriting(File file, Format format) throws IOException {
}
}

private static void drawAnimationFrame(BufferedImage img, Graphics2D g, double second) {
private static void drawAnimationFrame(BufferedImage img, Graphics2D g, double second, int frameIndex, int frameCount) {
drawClock(g, 232, 240, 150, second);

g.setPaint(Color.WHITE);
g.fillRect(472, 10, 168, 110);
g.setPaint(Color.BLACK);
g.drawString("Frame " + (frameIndex + 1) + " of " + frameCount, 473, 24);
}

private static void drawClock(Graphics2D g, int cx, int cy, int radius, double seconds) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f77de2a

Please sign in to comment.