Page MenuHomeFeedback Tracker

ctrlSetAngle artifacting when graphic touches canvas edges
Closed, ResolvedPublic

Description

Launcher version: 1.5.146373
Game version: 1.98.146728
Branch: profiling

When rotating an image/texture control which uses a picture that is using transparency and visible parts are touching the textures canvas edges, the pixels that are touching the canvas edges are being extended outwards creating visual artifacting.

These pixels are basically extending outwards. It is most pronounced at 45° angles.

Details

Severity
Minor
Resolution
Won't Fix
Reproducibility
Always
Operating System
Windows 10 x64
Operating System Version
Version 10.0.18363 Build 18363
Category
Ingame UI
Steps To Reproduce
  1. Create Control
  2. Apply texture with transparency with pixels touching the edges of the canvas
  3. Rotate control 45°

Copy paste code:

[] spawn {
    private _width = 64 * pixelW;
    private _height = 64 * pixelh;
    private _angles = [0, 45, 90, 135, 180, 225, 270, 315];

    waitUntil { !isNull findDisplay 46 };
    private _display = findDisplay 46;
    {
        private _ctrl = _display ctrlCreate ["RscPicture", -1];
        _ctrl ctrlSetPosition [
            70 * pixelW * _forEachIndex, 0,
            _width,
            _height
        ];
        _ctrl ctrlCommit 0;
        _ctrl ctrlSetAngle [_x, 0.5, 0.5, true];
        _ctrl ctrlSetText "\A3\ui_f\data\map\vehicleicons\iconManLeader_ca.paa";
    } forEach _angles;

    private _ctrl = _display ctrlCreate ["RscPicture", -1];
    _ctrl ctrlSetText "\A3\ui_f\data\map\vehicleicons\iconManLeader_ca.paa";
    _ctrl ctrlSetPosition [
        (count _angles) * 70 * pixelW, 0,
        _width,
        _height
    ];
    _ctrl ctrlCommit 0;
    private _i = 0;
    while {true} do {
        _ctrl ctrlSetAngle [_i, 0.5, 0.5, true];
        _i = (_i + 0.5) mod 360;
        sleep 0.05;
    };
};
Additional Information

As examples, the vanilla unit map icons have the tip of the arrow touching the canvas edge

It is not just the unit icons, vehicle icons also have that issue, tho those are just examples. It happens with every texture that fits the criteria

Event Timeline

diwako created this task.Sep 18 2020, 10:11 AM
diwako updated the task description. (Show Details)
diwako renamed this task from setCtrlAngle artifacting when graphic touches canvas edges to ctrlSetAngle artifacting when graphic touches canvas edges.Sep 18 2020, 10:15 AM
BIS_fnc_KK changed the task status from New to Need More Info.Sep 21 2020, 11:18 AM
BIS_fnc_KK added a subscriber: BIS_fnc_KK.

Could you please provide copy paste repro?

diwako edited Steps To Reproduce. (Show Details)EditedSep 21 2020, 12:04 PM

Sure thing! Code to repro has been added!

BIS_fnc_KK changed the task status from Need More Info to Assigned.

Thanks!

BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Jun 20 2021, 7:35 PM
BIS_fnc_KK closed this task as Resolved.
BIS_fnc_KK changed Resolution from Open to Won't Fix.

Seems connected to the content of the image touching image borders. Not really fixable, the bug must be in the core engine. Just make sure you leave at least 1 pixel padding

That I am aware of, the examples and issues however are with vanilla textures.

BIS_fnc_KK added a comment.EditedJun 21 2021, 4:21 PM

If I have time I will correct some of the textures but no promises. In the mean time you can tell me which textures should be priority