https://linen.dev logo
Join Discord
Powered by
# ceramic
  • b

    boundless-state-97873

    04/28/2023, 7:28 AM
    How do you draw a rectangle with rounded edges? I couldn't find a solution in the documentation. So far I'm thinking of making 3 rectangles and 4 circles, but haven't found how to draw circles 🙂 Or drawing through Shape by points, but that's a long time. How would you solve the problem?
  • b

    bright-gpu-74537

    04/28/2023, 7:38 AM
    could it be that its at sub pixel? If you drag it around does it become clear at some point? Also, what if you Std.int the x / y of the text display (presumably in TextDisplayImpl.hx)
  • b

    bright-gpu-74537

    04/28/2023, 7:39 AM
    rounded, gradient boxes with borders would be nice to know how to do also ( for @ambitious-knife-25690 ) 🙂
  • a

    ambitious-knife-25690

    04/28/2023, 10:37 AM
    > - what font are you using Ceramic's default > - are you using preRenderedSize or not, of so, which value Not entirely sure, I didn't do anything "special" here, just used ceramic's text display out of the box > - are you using Filters in those screens Yes, however adjusting the aliasing on the filters doesn't seem to make any difference weirdly > - are you setting targetDensity in project settings I am not
  • a

    ambitious-knife-25690

    04/28/2023, 10:39 AM
    Moving around doesn't affect clearness and inting the positions doesn't either
  • b

    bright-gpu-74537

    04/28/2023, 10:40 AM
    > Yes, however adjusting the aliasing on the filters doesn't seem to make any difference weirdly what if you remove the filter?
  • a

    ambitious-knife-25690

    04/28/2023, 10:41 AM

    https://cdn.discordapp.com/attachments/853414608747364352/1101458218456203355/image.pngâ–Ÿ

  • a

    ambitious-knife-25690

    04/28/2023, 10:41 AM
    yeah, that's the issue
  • a

    ambitious-knife-25690

    04/28/2023, 10:42 AM
    but why doesn't aliasing adjust the look đŸ€”
  • b

    boundless-state-97873

    04/28/2023, 11:34 AM
    It seems to work, of course the code is not perfectđŸ’© , but I could not think of a better idea of implementation.

    https://cdn.discordapp.com/attachments/853414608747364352/1101471550139543602/image.pngâ–Ÿ

  • b

    billowy-waiter-28954

    04/28/2023, 11:50 AM
    It’s a density issue, so antialiasing has nothing to do with that. Can you share the line(s) where you instanciate the filter?
  • a

    ambitious-knife-25690

    04/28/2023, 11:52 AM
  • b

    billowy-waiter-28954

    04/28/2023, 12:02 PM
    I think I’ll need access to a project reproducing the issue because I can’t see what’s wrong in the code
  • g

    gifted-whale-78169

    04/28/2023, 2:08 PM
    Look at the nineslice example, I believe that is what you're looking for
  • b

    billowy-waiter-28954

    04/28/2023, 5:18 PM
    Yes, the nine slice example is a good alternative. You'll have to create the underlying image to use as texture first, but that's actually more flexible as you can tweak the design on the image directly
  • a

    ambitious-knife-25690

    04/28/2023, 5:19 PM
    how would i send the project?
  • a

    ambitious-knife-25690

    04/28/2023, 5:19 PM
    with or without the .haxelib directory?
  • a

    ambitious-knife-25690

    04/28/2023, 5:21 PM
    decided by discord
  • a

    ambitious-knife-25690

    04/28/2023, 5:21 PM
    can't send with the .haxelib directory due to file size too large đŸ€Ł
  • b

    billowy-waiter-28954

    04/28/2023, 5:44 PM
    Yes without .haxelib 😄
  • b

    billowy-waiter-28954

    04/28/2023, 5:45 PM
    Anyway, I’ll download the file but won’t have time to check right away
  • a

    ambitious-knife-25690

    04/28/2023, 5:46 PM
    dw about it, i'm sure there are other things i need to polish up around it anyway
  • a

    ambitious-knife-25690

    04/28/2023, 11:49 PM
    (just noticed, that i sent the project with
    return;
    before the clip rect stuff can work so it won't render the issue)
  • a

    ambitious-knife-25690

    04/28/2023, 11:51 PM
    https://cdn.discordapp.com/attachments/853414608747364352/1101656847959732344/output.zip
  • b

    boundless-state-97873

    04/29/2023, 6:11 AM
    No, I need to dynamically set the color and a picture is not an option
  • b

    billowy-waiter-28954

    04/29/2023, 6:17 AM
    If you use a white texture, you can set it to the color you want. Anyway the « clean » way would be to create a mesh with proper vertices to have rounded corners, but that doesn’t exist in Ceramic at the moment, so you would have to write it yourself (the code would be similar to Arc, but with different vertices)
  • b

    boundless-state-97873

    04/29/2023, 6:22 AM
    Thank you. I don't have any game development experience yet, just some pixi and React. I just didn't think of painting a white texture through filters. But the code that solves my problem I wrote.
  • b

    boundless-state-97873

    04/29/2023, 6:27 AM
    And I don't like using pictures in programs at all. I prefer them to svg or carvas. It's all the fault of the web 🙂
  • b

    billowy-waiter-28954

    04/29/2023, 6:42 AM
    No need to use filters, just set the NineSlice color property
  • b

    boundless-state-97873

    04/29/2023, 6:55 AM
    Roger. It's very convenient👍
1...112113114...124Latest