I'd like to draw graphs and arbitrary lines in a canvas like gui element.
Use it for utilisation, custom shapes, lines circles etc. Essentially I'd like to have the equivalent of the luarendering API but instead targetting an gui element to draw into.
Canvas gui element
Re: Canvas gui element
I don't see this as ever happening sorry.
If you want to get ahold of me I'm almost always on Discord.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Canvas gui element
Use a camera gui element on a black surface. Then use LuaRendering to draw to that surface *cough*. I need to go now.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: Canvas gui element
That is the use case of the modding interface request that initially led to the addition of LuaRendering so don't think I'm unaware of the hacks that people are doing with it :peradicator wrote: ↑Sat Jun 22, 2019 1:02 pm Use a camera gui element on a black surface. Then use LuaRendering to draw to that surface *cough*. I need to go now.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: Canvas gui element
My plan exactly. I need high contrast text and a way to draw graphs. So Plan B it is.eradicator wrote: ↑Sat Jun 22, 2019 1:02 pm Use a camera gui element on a black surface. Then use LuaRendering to draw to that surface *cough*. I need to go now.
Rendering GuiElement
Add a blank GUI element that can be rendered using the LuaRendering API.
This is already possible using cameras, but cameras require you to create a surface, which feels dirty:
Intuitively this has a fair bit of overhead: I am creating a new universe that can have entities and pollution and wind and a day/night cycle and stuff, but all I wanted was to draw a snazzy button. How often is it redrawn? Presumably 60 times a second!
Ideally there would be a RenderingBuffer object that is decoupled from the game world. Something I can render once and display in a gui render element.
This is already possible using cameras, but cameras require you to create a surface, which feels dirty:
Code: Select all
local surf = game.create_surface(surface_name, game.default_map_gen_settings)
local cam = container.add
{ type = 'camera'
, surface_index = surf.index
, position = { x = ix, y = 0 }
, zoom = scale
}
Ideally there would be a RenderingBuffer object that is decoupled from the game world. Something I can render once and display in a gui render element.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Rendering GuiElement
Duplicate: viewtopic.php?p=438089#p438089
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: Rendering GuiElement
Can I close/delete my own thread?
Re: Canvas gui element
[Koub] Merged the newer topic into the older .
Koub - Please consider English is not my native language.