Git Product home page Git Product logo

vgraph's People

Contributors

inglonias avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vgraph's Issues

Add a polygon layer

Add the ability to fill in certain sections of the page with a solid color, either with arbitrary polygons or governed by nearby lines.

Ellipse Tool

Add a tool for drawing ellipses that are not perfectly round.

The two click points would be the two radii of the ellipse, and the center would be the third point of a right triangle with the other two points.

Low framerate when canvas is very large

When the canvas becomes very large for whatever reason, either because the user has created a very large canvas or they zoom in to the maximum level, VGraph noticeably slows down. This is because it is drawing the entire canvas regardless of how much of it is actually visible.

This would be a tricky one to fix, but I'm putting it in the issues list for anyone who wants a challenge. The obvious fix would be to stop drawing things that aren't currently visible, but considering how the code works right now, I'm not sure how you would go about doing that without redoing the way rendering happens entirely.

Shape tools

I would like to ability to draw rectangles and "circles", in the sense that I want to be able to draw an N-gon that most closely resembles an arbitrary circle while still obeying all currently existing rules of lines on the page. Rectangles are easy, but I don't know the math behind creating arbitrary polygons that represent circles at given sizes.

Merge tool is unreliable when merging a line with a subset of itself

If a line goes from, say, (0, 0) to (5, 5), and another line goes from (0, 0) to (3, 3), and then the merge tool is used, these two lines will be merged incorrectly, replaced at first with a line going from (3, 3) to (8, 8), but when the mouse moves, the actual line is between (3, 3) and (5, 5). This is incorrect. The behavior in this case should be to simply delete the shorter line.

A special case for lines merging with these "subset" lines needs to be created to account for this, and a unit test must be made to ensure this behavior does not continue.

Add persistent config options

Expose the ability to configure default options for various elements of VGraph. Ideally, these options would be kept in an ini or JSON config file outside of the program, but still be possible to edit from some kind of options screen within VGraph.

  • Grid border color
  • Grid lines color
  • Grid background color
  • Center lines color
  • Default lines color
  • Cursor color
  • Default canvas width, height, square size, and margin.
  • Default window size, as well as whether or not it should be maximized on startup.

Center lines

Add an option to highlight center lines on the grid background. A single line for even dimensions and a pair of lines for odd dimensions.

Unit testing

I should have some unit tests. This depends mainly on whether or not I can automate a build and release pipeline using GitHub Actions. This is apparently possible but not intuitive.

Odd drawing mode

It would be useful for certain tools to be able to draw in an "odd" fashion. For example, a circle with a radius of 1.5 rather than 1, 2.5 rather than 2, and so on.

While I haven't worked out the math yet, I have an idea for an implementation style - Everything that implements IDrawTool must provide a DrawWithToolOdd method that returns a LineSegment[]. The default implementation of this would be to just call DrawWithTool as normal, but for tools where it matters, there can be a different implementation.

Eyedropper tool

Create an eyedropper tool that lets users pick up line colors they want to reuse.

Update unit tests

With the addition of odd mode mirroring, the automated test needs to be updated to test that situation as well.

Make move operations specifically undoable

Allow users to undo moving labels and lines.

Implementation:

  • Have the program track whether the last change to the grid was a move operation, along with which elements were moved.
  • Combine all move operations that involve the same elements
  • Once the user does something that doesn't involve that group of elements, add the new state to the undo stack.

The trickiest part of this is the situation where a user moves an element or set of elements, and then selects a different element or group of elements to move. We can't just assume that once the user stops moving lines, that's when we can add the undo state. It may be necessary to change the way undo and redo are handled away from simply saving copies of every element, and instead transitioning to a delta object of some sort.

Zooming in and out can cause screen to vanish until mouse moves again

This is caused by the new framerate limiter. A redraw can only be forced when the framerate timer says so, and if it doesn't say so, then the screen is blank until it does. This is usually a minor issue - simply wiggling the mouse brings the screen back, but it doesn't look good.

Text label support

Allow users to add text labels to arbitrary points on the grid using a text tool and associated data layer.

  • The placement of the labels will be grid-relative, just like lines.
  • Text will not be scaled when zoomed - This will allow for some interesting functionality, and exports are all at default zoom anyway.
  • Selection would need to be handled. Currently, the best idea I have is that when the Text tool is selected, it would not be possible to manipulate lines anymore, only text labels.
  • Integration with the Undo/Redo history is going to be tricky. How that is handled will need to be changed.

Investigate MAUI support to make VGraph work across multiple platforms

I may be able to port VGraph using MAUI. Not sure how easy or difficult that would be, since the GUI is pretty much married to WPF (and to a lesser degree, Windows Forms), but it's worth looking at if I ever get bored. Alternatively, I may be able to rewrite the front-end using Xamarin or something.

Background images for tracing

The ability to import a background image to trace over would be a huge boon for e.g. translating orthographic drawings into FTD replicas.

Some auxiliary features for usability:

  1. The ability to set and change the image scale (in source image pixels per grid square).
  2. The ability to set and change the X/Y offset for the image.
  3. An opacity slider.
  4. The ability to save the background image name and settings to the project file.

Tabs allowing editing more than one canvas at a time

Allow the user to edit more than one image at a time through the use of tabs.

The most difficult part is ensuring that each tab is completely separated from one another. Notable examples include but are not limited to:

  • If you start drawing in one tab, you should not be able to complete that shape in the other tab without starting over
  • Undo/Redo should be totally separate for each tab.
  • Save, load, and export should work correctly for each tab.

Move drawing buttons to a more visible place

The drawing tools should be in a drawer on the side of the window, rather than hidden away in the Tools menu. The Tools Menu should be for things like mirroring the drawing, and merging lines.

Resizeable canvas

Right now if you want to resize the canvas, you can either do some clever tricks with importing files, or you change the values in the save file directly. While not difficult if you know how to do it, it's tedious and there really should be a way to change the canvas size in the program.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.