fix(m110): keep the marker annulus over sprite carriers

This commit is contained in:
2026-09-23 21:17:48 +08:00
parent 0a05cb8e6f
commit 6b3b8c0d73
@@ -1301,7 +1301,8 @@ func _ring_carrier_ratio(image: Image, center: Vector2, radius: float, stroke: C
var py := int(round(probe.y))
if px < 0 or py < 0 or px >= image.get_width() or py >= image.get_height():
continue
if _point_in_any_rect(ui_rects, Vector2(px, py)):
var pixel_position := Vector2(px, py)
if _point_in_any_rect(ui_rects, pixel_position):
continue
var color := image.get_pixel(px, py)
if _is_palette_blend(color, stroke, underlays):
@@ -1379,8 +1380,8 @@ func _path_contrast(image: Image, shell: Control) -> Dictionary:
var core_ratio := float(worst.ratio)
var core_carrier: Color = worst.carrier
var core_median := float(measured[measured.size() / 2].ratio)
var source_ratio := _ring_carrier_ratio(image, source, width * 0.012, stroke, underlays, ui_rects, actor_rects)
var target_ratio := _ring_carrier_ratio(image, target, width * 0.029, stroke, underlays, ui_rects, actor_rects)
var source_ratio := _ring_carrier_ratio(image, source, width * 0.012, stroke, underlays, ui_rects)
var target_ratio := _ring_carrier_ratio(image, target, width * 0.029, stroke, underlays, ui_rects)
var worst_ratio := minf(core_ratio, minf(source_ratio, target_ratio))
return {
"method": _path_contrast_method(),