Android Question Unwanted Pixel appearance at the corners

Discussion in 'Android Questions' started by Scantech, Apr 15, 2019.

  1. Scantech

    Scantech Well-Known Member Licensed User

    Why does the corners have different color dots?

    I can't figure this out yet.

    Click "not used" button to display the large gauge
     

    Attached Files:

  2. klaus

    klaus Expert Licensed User

    What corner dots are you speaking of?
     
  3. Scantech

    Scantech Well-Known Member Licensed User

    I have circled with red color to point out the dots.
     

    Attached Files:

    • Pic.jpg
      Pic.jpg
      File size:
      293.8 KB
      Views:
      48
  4. klaus

    klaus Expert Licensed User

    It depends also on the device screen resolution.
    This is the corner on my Samsung Galaxy S8.

    upload_2019-4-16_19-52-54.png upload_2019-4-16_19-53-40.png

    I suppose that the problem is due to the anti aliasing.
    From what I know, it cannot be disabled.
    BitmapCreator has a ReplaceSemiTransparentPixels(NewColor As Int, Rect As B4XRect) method.
    Not sure if it will solve your problem.
     
    Scantech likes this.
  5. Scantech

    Scantech Well-Known Member Licensed User

    that did not work(replacesemiTransparentPixels)
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    I see it too after I take a screenshot and enlarge it. It is not noticeable on the device directly.

    If you can reproduce it in a small project then I can further investigate it.
     
    Scantech likes this.
  7. Scantech

    Scantech Well-Known Member Licensed User

    Here you go. Emulator will be a great way to see it or 480x800 screen resolution
     

    Attached Files:

  8. Erel

    Erel Administrator Staff Member Licensed User

    You are calling DrawRectRounded with corner radius set to 0. This case is easy to fix. DrawRectRounded should call DrawRect.
    Does it happen in other cases where the radius > 1 ?
     
    Scantech likes this.
  9. Scantech

    Scantech Well-Known Member Licensed User

    No it is fine greater then 0. I changed it to DrawRect2 and its ok. Thanks
     
  10. Erel

    Erel Administrator Staff Member Licensed User

    I will update BitmapCreator to draw with DrawRect when the radius < 1.
     
    kanati and Scantech like this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice