Hello Andy,
my colleagues have finalised the update of software components for several NXP iMXRT targets in version 9.30. It includes the above explained modification to enhance the raster algorithm so that it allows more edges intersecting the same sub-pixel. To use this new version, please log-in on our download center and download the ZIP files found below the sections:
* Embedded Wizard Build Environment for IMXRT1050-EVK
* NXP iMX_RT Professional AddOn
Use the contents of the ZIP files to replace the corresponding preceding versions. I hope, this update eliminates the suspect lines. Concerning your actual implementation I also see an additional optimization:
Your actual code:
TargetIcon_Normal.PushMatrix();
TargetIcon_Normal.InitSubPath( 2*n, 3 );
TargetIcon_Normal.Translate(x,y);
TargetIcon_Normal.Rotate(angle1);
TargetIcon_Normal.AddCopy( 2*n, TargetIcon_base, 0, 0, 3 );
TargetIcon_Normal.Close(2*n);
TargetIcon_Normal.PopMatrix();
TargetIcon_Normal.PushMatrix();
TargetIcon_Normal.InitSubPath( 2*n+1, 1 );
TargetIcon_Normal.Translate(x,y);
TargetIcon_Normal.Rotate(angle2);
TargetIcon_Normal.AddCopy( 2*n+1, TargetIcon_base, 1, 0, 1 );
TargetIcon_Normal.Close(2*n+1);
TargetIcon_Normal.PopMatrix();
... could be replaced by following code (the matrix stack is not used anymore and Close() path is not necessary since the original path is already closed):
TargetIcon_Normal.InitMatrix();
TargetIcon_Normal.InitSubPath( 2*n, 3 );
TargetIcon_Normal.Translate(x,y);
TargetIcon_Normal.Rotate(angle1);
TargetIcon_Normal.AddCopy( 2*n, TargetIcon_base, 0, 0, 3 );
TargetIcon_Normal.InitMatrix();
TargetIcon_Normal.InitSubPath( 2*n+1, 1 );
TargetIcon_Normal.Translate(x,y);
TargetIcon_Normal.Rotate(angle2);
TargetIcon_Normal.AddCopy( 2*n+1, TargetIcon_base, 1, 0, 1 );
Please let me know, whether the new updates do improve the behavior.
Best regards
Paul Banach