Documentation Format Unit Testing
This page exists only to exercise documentation formatting, styling, and Docusaurus behavior. It is intentionally not linked from the site navigation and should not be treated as user documentation.
This page is a visual regression sandbox for the docs site. If a theme, Markdown parser, code highlighter, or custom CSS change breaks something, this page should make it obvious.
Typography
Normal paragraph text should be comfortable to read at desktop and mobile widths.
Bold text should be obvious without becoming visually heavy.
Italic text should remain readable.
Bold italic text should work.
Strikethrough text should render correctly.
Inline code such as org.yurie.kanvas, kanvasDoctor, and strictRenderer = true should remain visually distinct without breaking line height.
A deliberately long inline token for overflow testing:
dev.yurie.display.agent.ComposeCaptureHooks.frameStartLayerRecording(java.lang.Object,long,java.lang.Object)
Heading level 3
Heading level 4
Heading level 5
Heading level 6
Links
Internal link: Kanvas
Technical link: Kanvas Technical Internals
External link: Kanvas on GitHub
Inline source link: KanvasPlugin.kt
Admonitions
A low-priority note used for supplemental information.
An informational card for architecture context, implementation details, or useful background.
A recommendation that should help the reader complete a task faster or avoid unnecessary work.
A warning for compatibility concerns, pre-release behavior, or operations that may fail unexpectedly.
A high-severity callout for behavior that can break builds, crash the runtime, corrupt native state, or produce misleading renderer results.
Admonition with code
Use a fenced block inside a callout:
kanvas {
target = ":desktop"
backend = "auto"
strictRenderer = false
}
Inline code such as backend = "auto" should also remain readable inside the card.
Admonition with a list
Check all of the following:
- Java agent loaded
- frame transformer installed
- canvas transformer installed
- native library available
- GPU backend created
- presentation succeeded
Code blocks
Use the normal Docusaurus title="..." metadata on a fenced code block. The site theme automatically derives the language badge from the fence language.
\`\`\`kotlin title="build.gradle.kts"
plugins {
id("org.yurie.kanvas")
}
\`\`\`
Kotlin
plugins {
id("org.yurie.kanvas") version "0.1.0"
}
kanvas {
target = ":desktop"
backend = "auto"
strictRenderer = true
capture = true
takeover = true
}
Java
public final class RendererProbe {
public static boolean ready(boolean frame, boolean canvas) {
return frame && canvas;
}
}
C
kd_status present_frame(
kd_jvm_renderer *renderer,
const kd_draw_command *commands,
uint32_t count
) {
if (!renderer || !commands || count == 0) {
return KD_INVALID_ARGUMENT;
}
return kd_jvm_present_backend(renderer, commands, count);
}
Bash
./gradlew kanvasDoctor
./gradlew kanvasCompatibility
./gradlew kanvasRun
PowerShell
./gradlew.bat kanvasDoctor
./gradlew.bat kanvasRun
Text / terminal output
[Kanvas] takeover armed
[Kanvas] TRANSFORMED_SKIKO_FRAME org.jetbrains.skiko.SkiaLayer mode=picture-replay
[Kanvas] TAKEOVER_PRESENTED commands=42
Long line / horizontal overflow
THIS_IS_A_PURPOSELY_LONG_SINGLE_LINE_TO_TEST_HORIZONTAL_CODE_BLOCK_SCROLLING_AND_ENSURE_THE_DOCUMENT_LAYOUT_DOES_NOT_EXPAND_PAST_THE_VIEWPORT_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789
Lists
Unordered
- Renderer
- Runtime
- Java agent
- JNI bridge
- command arrays
- texture resources
- Native backend
- Metal
- Vulkan
- OpenGL
- Direct3D 9
Ordered
- Apply plugin.
- Resolve target task.
- Provision runtime.
- Attach Java agent.
- Install transforms.
- Arm takeover.
- Present frame.
Task list
- Plugin loaded
- Runtime built
- Agent attached
- Every renderer operation implemented
- Every GPU/driver combination verified
Table
| Layer | Responsibility | Failure example | Severity |
|---|---|---|---|
| Gradle | Build/run integration | Target task not found | Error |
| Java agent | Bytecode interception | Frame transform missing | Error |
| Capture | Frame lowering | Unsupported paint behavior | Warning/Error |
| JNI | Native protocol | Invalid array shape | Error |
| Backend | GPU presentation | Swapchain out of date | Recoverable |
| Packaging | Runtime embedding | Native library missing | Error |
Wide table
| Backend | macOS | Windows | Linux | GPU | Reference-only | Notes |
|---|---|---|---|---|---|---|
| Metal | Yes | No | No | Yes | No | Primary Apple backend |
| Vulkan | Limited/stub depending on host | Yes | Yes | Yes | No | Explicit loader/runtime requirements |
| OpenGL | No current primary path | Yes | No current primary path | Yes | No | Windows alternative |
| Direct3D 9 | No | Yes | No | Yes | No | Legacy Windows backend |
| GDI | No | Yes | No | No | Yes | Software/reference path |
Blockquotes
Renderer takeover is not proven merely because the application window is visible.
Nested quote:
Outer diagnostic statement.
Inner diagnostic statement used to test nested quote styling.
Horizontal rule
Text above.
Text below.
Mixed formatting
The kanvasCompatibility task is informational, while kanvasDoctor may report a blocking ERROR.
A released plugin may resolve a matching vX.Y.Z runtime source tag so that the Gradle plugin, Java agent, JNI protocol, and native runtime remain on the same release line.
Implementation reference: effectiveSourceRef.
Long prose wrapping
Kanvas crosses multiple compatibility and ownership boundaries at runtime, including Gradle task resolution, JVM launch configuration, Java instrumentation, Skiko implementation details, Skia canvas interception, JNI data validation, native resource lifetime management, platform window attachment, graphics backend creation, swapchain behavior, texture upload semantics, frame presentation, and packaging. This intentionally long paragraph exists to verify line length, wrapping, readable measure, right-side table-of-contents spacing, and mobile behavior when technical prose contains many long compound terms.
Escaping and symbols
Characters:
< > & " ' / \\ : ; , . ? ! @ # $ % ^ * ( ) [ ] { } + = _ -
Common renderer notation:
N × 4
width × height
Gradle → Agent → JNI → Native → GPU
Metal / Vulkan / OpenGL / D3D9
Definition-style formatting
Frame boundary
The point at which Kanvas considers the frame sufficiently complete for capture and presentation.
Takeover
Kanvas owning the final presentation path rather than merely observing renderer calls.
Capture
The process of intercepting and lowering rendering operations into Kanvas state and commands.
Strict renderer mode
A verification mode that makes unsupported or ambiguous renderer ownership failures visible.
Intentional visual checklist
When reviewing this page, verify:
- admonitions have correct border colors and spacing
- code blocks scroll horizontally instead of widening the page
- inline code does not distort line height
- nested lists remain readable
- tables scroll on narrow screens
- headings have consistent spacing
- links are visibly distinct
- dark mode preserves contrast
- sidebar and right-side page TOC do not overlap content
- long paragraphs maintain a readable line width
- mobile layout does not overflow
- external source links remain usable