Skip to content

drawLine wrong when thickness !=1 #2322

@NgVThangBz

Description

@NgVThangBz
  • axmol version:2.3.1
  • devices test on:All devices
  • developing environments
    • NDK version: r23c
    • Xcode version: 14.2+
    • Visual Studio:
      • VS version: 2022 (17.9+)
      • MSVC version: 19.39+
      • Windows SDK version: 10.0.22621.0+
    • cmake version:
      Steps to Reproduce:

just simple check:
mydraw->drawLine(Vec2(200,200), Vec2(400,200), Color4B::RED,1);
mydraw->drawLine(Vec2(200,300), Vec2(400,300), Color4B::RED,2);
and result:
Screenshot 2025-01-10 at 11 15 33

It seems like the thickness needs to be divided by a factor

It seems to be related to _contentScaleFactor

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions