Search the Community
Showing results for tags 'context'.
-
As I make an infrastructure for a new LE project - a simple logic puzzler with cuboid manipulation and matching - I have to use context rendering for GUI. As is well known, LE offers only a basic drawing functionalities, some of which are broken btw. To paliate the problem, I've written a simple 2D drawing library. The library offers such intuitive entities as text, rect, image and animation with accompanying methods such as SetPosition, SetRotation, SetScale, SetPivot (for rotation purposes), etc, as well as methods for testing mouse interaction and entities intersection. I've tried to make a lib API consistent with LE's interface. In this updated, I've optimized Interaction and Intersection candidate qualification check, made an API more consistent, and rewritten few functions here and there Here is a github repo. To use a lib, just put an LED folder in LE Scripts folder and use the Main.lua file from the LED repo.
-
Hello! Would it be possible in LE to draw only a part of the image on the screen (via context). I mean, let's say I have a 256 x 256 texture with four 64 x 64 frames. Now, I would like to be able to draw, for example, a part of the image with following specs: x = 64, y = 0, w = 64, h = 64. I'm asking that because I'm building a basic 2d graphics lib and would like to implement animation in more elegant manner: right now, I'm just loading bunch of textures as frames, which is cumbersome and not quite efficient from renderer's point of view. Thank you.
-
Hello, when I use Context:DrawRect() with scaled (1, 3) context with a style = 1 (ie. not filled) I get this as a result: On the contrary, when I use style = 0 - ie. filled rectangle, everything seems to be OK:
-
need one more command for using bitmap fonts. DrawImage(Texture* texture, int x, int y,int offsetx, int offsety, int width, int height) this function already draw all, think its easy to add.