https://linen.dev logo
Join Discord
Powered by
# haxe-ui
  • b

    bright-gpu-74537

    02/26/2023, 1:05 PM
    and then in your module.xml, you could have something like:
  • b

    bright-gpu-74537

    02/26/2023, 1:05 PM
    Copy code
    xml
    <image-loaders>
        <image-loader prefix="animation" class="my.custom.thing.that.loads.and.displays.an.Animation" />
    </image-loaders>
  • b

    bright-gpu-74537

    02/26/2023, 1:05 PM
    et viola, now you can use
    <image resource="animation://....>
  • b

    brave-kangaroo-30399

    02/26/2023, 1:12 PM
    Sweet I’ll check it out later today
  • b

    bright-gpu-74537

    02/26/2023, 1:12 PM
    no no, none of this exists yet 🙂 Its a proposition
  • b

    brave-kangaroo-30399

    02/26/2023, 1:12 PM
    Oh lol I misunderstood
  • b

    brave-kangaroo-30399

    02/26/2023, 1:12 PM
    But ok makes sense
  • b

    bright-gpu-74537

    02/26/2023, 1:13 PM
    haha, yeah, at the moment there is one ImageLoader in haxeui, and does "all the things" and all of those things are hardcoded (basically) and not extensible
  • b

    bright-gpu-74537

    02/26/2023, 1:13 PM
    but i think this could be a really tasty addition... ... and it feels very "haxeui" 🙂
  • b

    bright-gpu-74537

    02/26/2023, 1:14 PM
    i mean, even the ability to swap out the core http loader or the file loader, in itself is neat
  • o

    orange-van-60470

    02/26/2023, 1:23 PM
    Ian have managed to implement smooth lines https://gist.github.com/nanjizal/2b10bf55cbbb02c3d4b5b59926996ec1 Shapes are mostly based on triangles even curves, they can be hitTest, the api is now abstracted. https://github.com/nanjizal/triangleGML The trianglegml library contains a generic abstract class API that parses basic shape nodes, could be improved and implemented in canvas/svg/pixelimageXY( inprogress )/cornerContour(GL)/display.graphics etc.. Probably not what you want and not yet commited the pixelimageXY improvements needed, but implementation is getting there.
  • o

    orange-van-60470

    02/26/2023, 1:25 PM
    You can see the API for trianglegml here https://nanjizal.github.io/triangleGML/pages/
  • o

    orange-van-60470

    02/26/2023, 1:26 PM
    it contains xml parsing but implementation is separate initially in pixelimageXY atleast
  • o

    orange-van-60470

    02/26/2023, 1:27 PM
    to implement each shape you want to use needs to extend it's '_' abstract class with a render method
  • o

    orange-van-60470

    02/26/2023, 1:29 PM
    In triangleGML_ need to implement getTriangleGML method a big switch statement containing the shapes you have implemented
  • o

    orange-van-60470

    02/26/2023, 1:30 PM
    I am in process of moving the old pixelimage xml render stuff over, so not yet commited that but seems to work.
  • o

    orange-van-60470

    02/26/2023, 1:33 PM
    So for instance sample test.. produces

    â–¾

    with hxcpp.. but as I mentioned the pixel implementaton was developed in js. still lots to do but maybe potential
  • o

    orange-van-60470

    02/26/2023, 1:34 PM
    pixelimageXY is not currently up to date.
  • o

    orange-van-60470

    02/26/2023, 1:35 PM
    In theory anyone could implement canvas or opengl target against trianglegml, implementations will likely shape the api.
  • o

    orange-van-60470

    02/26/2023, 1:41 PM
    anyway I can see it could be used with a multi toolkit ui to add a basic graph and diagram sheet.
  • b

    bright-gpu-74537

    02/26/2023, 1:44 PM
    i think first it needs to be proven that it can work with, say, hxwidgets (not haxeui), but i dont have time to play and, frankly, the way you paste just tons of examples and walls of text makes it almost impossible to grep anything sensible. I havent seen, or dont remember seeing, a "heres an interface that can draw lines, and output a byte array ready for any framework"... ... maybe you have shown me that, but again, the walls and walls of text make me just switch off
  • o

    orange-van-60470

    02/26/2023, 1:51 PM
    old sample folder pixels drawn on js canvas some early png image created on terminal with format installed using hxcpp using new trianglegml
  • o

    orange-van-60470

    02/26/2023, 1:52 PM
    so the png are created from XML node rendered with pixels and put on png using format
  • o

    orange-van-60470

    02/26/2023, 1:53 PM
    in terms of interfaces it is not optimal but
  • o

    orange-van-60470

    02/26/2023, 1:54 PM
    https://github.com/nanjizal/pixelimageXY/blob/main/src/pixelimage/formats/Format.hx#L12
  • b

    bright-gpu-74537

    02/26/2023, 1:54 PM
    yeah, i was just looking at that function
  • o

    orange-van-60470

    02/26/2023, 1:54 PM
    NME was down when I tried but there is some feasible code for that
  • b

    bright-gpu-74537

    02/26/2023, 1:54 PM
    im pretty sure that type of thing could also work to set the bytes for a wxImage data
  • o

    orange-van-60470

    02/26/2023, 1:55 PM
    https://github.com/nanjizal/pixelimageXY/blob/main/src/pixelimage/formats/NMEbitmapData.hx
  • o

    orange-van-60470

    02/26/2023, 1:56 PM
    I had problems getting FORMAT version to open and draw on png for cppia and neko... but I think that maybe a file create issue
1...153815391540...1687Latest