• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

excaliburjs / Excalibur / 27523952990
89%

Build:
DEFAULT BRANCH: main
Ran 15 Jun 2026 04:34AM UTC
Jobs 1
Files 243
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Jun 2026 04:25AM UTC coverage: 88.498% (-0.001%) from 88.499%
27523952990

push

github

web-flow
fix: update NineSlice rendering logic and add visual test images #3777 (#3782)

# Fix NineSliceStretch.Tile clipping behavior

## Description

Fixes issue #3777 where `NineSliceStretch.Tile` mode was squashing partial tiles instead of clipping them to fit the destination space properly.

## Problem

When using `NineSliceStretch.Tile` mode, the last partial tile would be distorted to fit the remaining space rather than being clipped. This behavior did not match the documented behavior: "takes input slice and paints it across the entirety of the output dimensions in a repeating texture fashion that will not distort the source image at all, but may not fit properly in the destination space, leaving a potentially partial drawing of the texture remaining."

**Expected behavior:** Tiles should repeat without distortion, with partial tiles at edges being clipped.
**Actual behavior:** Partial tiles were being stretched/squashed to fit the space.

## Solution

Modified the `_drawTile` method in `src/engine/graphics/nine-slice.ts` to properly apply clipping when drawing tiled sections. When `NineSliceStretch.Tile` is used, the source dimensions (`srcW` and `srcH`) now correctly reflect the calculated `tempSize` instead of always using the full `targetCanvas` dimensions.

The fix ensures that:
- When horizontally tiling, the source width uses `tempSize` for horizontal calculations
- When vertically tiling, the source height uses `tempSize` for vertical calculations
- This allows the canvas clipping to properly handle partial tiles at the edges

## Testing

Verified with checkerboard pattern tiling to confirm tiles are no longer distorted when they don't fit evenly into the destination space.  

## Related Issues

Closes #3777

6754 of 8926 branches covered (75.67%)

4 of 4 new or added lines in 1 file covered. (100.0%)

15350 of 17345 relevant lines covered (88.5%)

24343.35 hits per line

Jobs
ID Job ID Ran Files Coverage
1 27523952990.1 15 Jun 2026 04:34AM UTC 243
88.5
GitHub Action Run
Source Files on build 27523952990
  • Tree
  • List 243
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #27523952990
  • 07eef6eb on github
  • Prev Build on main (#27514008694)
  • Next Build on main (#27587712253)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc