gregjohnson2017 / tabula-editor Goto Github PK
View Code? Open in Web Editor NEWAn image editor built from scratch with OpenGL in Go.
License: MIT License
An image editor built from scratch with OpenGL in Go.
License: MIT License
There is a section of commented code left in the font loading function that writes the loaded font texture to an image for viewing. I think it's better to have this logically separated into its own function so myself and others know what it does, rather than having some random block of unrelated commented code sitting in a function.
Selection outline not appearing on certain edges of the image (bottom and left?)
And possibly render it alongside the menu bar at the top? SVG or PNG?
As of 0.4.0, github.com/veandco/go-sdl2 supports static compilation using the -tags static
build flag. (for module mode, which we are using.. has been available since 0.3.0)
This allows us to build without having SDL2 installed at all.
This allows us to rework how the y component of the origin point for vertical text alignment is calculated, and remove the mapStringWithBearing function
Hovering mouse above and to the left of the 0 row/column shows another 0 row/column
Select tool messed up after opening a new image with different dimensions
I just noticed this library: https://github.com/uber-go/zap
Notably, it's a few times faster than standard library and has "structured logging" support. There is an even faster, buffered version that would be even more useful for large amounts of logging in frequently used functions, like in the case of performance logging.
There are also encoder configurations, by default production and development.
If logging is super fast, then we can just always log (except performance maybe) to a file somewhere, which would be useful for catching random crashes.
We don't want there to be gaps in selection if you are clicking and dragging. So, we need to create a line between the last drag point and the current drag point and fill that selection in.
This will be needed for the coloring, too, so the function should be generic enough to work for that.
Zooming in too far in larger images (correlation between larger images and how far you need to zoom in to observe the bug) makes selection outlines go haywire (also appears to be pixel misaligned too)
The pixel coordinates are not out of an acceptable range, but it still causes a panic.
Here is the line that the check failed at.
The code for menu bar definitions looks almost like a markup language already, and as the menu bars get more complicated, it would make it more readable.
This will allow us to use it in other code bases.
We need dialog prompts for things like: Edit canvas, enter width and height. It would need to have fields where the user can enter values, and cancel/confirm buttons.
This is a somewhat complicated issue, and may require the use of other shader types than vertex/fragment.
If we can compute selection outlines in the shader, we can better control the performance, because we could forgo computing all the selection lines on all the selected pixels on the CPU.
When interacting with menu buttons, sometimes a button registers multiple clicks. This can be reproduced consistently by holding a click on the "File" button in the menu bar and then without releasing the click, just drag the mouse down over the "Open" menu list entry. For me it calls the open function ~3 times. Furthermore, it shouldn't be activated at all until the button itself receives a left mouse down and then left mouse up.
When opening large images, such as those taken by expensive cameras, reaching into 10,000 by 10,000 pixels, it's really slow.
Our current implementation uses a map to keep track of which pixels are currently in use. The problem is that such an image needs 100 MB of space if using a single byte to store that information, assuming no overhead, like in an array.
Perhaps we should consider rectangle selections that don't save all that information, at least as an alternative in big images.
This should help us prevent some cringe and potentially buggy code.
The first time you load an image, either by passing it in as an argument when you start, or without an argument when you first select an image through the file dialog, the selection outlining does not work. After clicking open to reload an image it works.
Any good editor should have undo and redo commands. This will come with some careful design considerations.
Colors need to be picked, and we need an interface to pick em
Ctrl-v will open the image that is in the clipboard in the editor.
Ctrl-c will copy either the selected pixels or the contents of the editor, if no pixels are selected, into the clipboard.
Also make sure to update the ReadMe and GitHub Actions workflows.
Currently, sdl2-gfx is only being used for an FPS manager. If we can figure out exactly what that does, we can make it in Go without needing to reach into C, after which we can remove the dependency.
It would be nice to have the performance of a bunch of specific operations measured, such that if we need to improve performance, it is easy to figure out what's taking the most time.
Having debugging logging can help document the code in a sense, along with allowing us to debug without using breakpoints and print statements.
The log package in the standard library makes it easy to create multiple logger types and enable/disable them, removing the need for excessive conditions around log statements.
Currently, it's hard to separate anything, because of cyclical imports. So, I need to separate out the current types and functions in order to allow smaller package in new code we write.
These would include rectangular select, fuzzy/magic select, any other ideas
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.