A vector-drawing program in Kotlin and Java FX

Related tags

Charts Artist
Overview

Artist

This is a vector-drawing program in Kotlin/Java FX. Your program will allow a user to select shapes to draw, set their properties, and draw the shapes on-screen. This type of program would typically be used to draw simple diagrams.

1. Demo:

截屏2022-08-06 下午5 44 35

2. Techinique:

  1. Construct an interface using Kotlin and Java FX components and layouts.

  2. Support interaction with a drawing canvas, where users can draw shapes using graphics primitives.

  3. Handle mouse and keyboard interaction, and implement standard interactive features.

3. File:

  • New: create a new blank drawing (and prompt the user to save if the current drawing is unsaved).

  • Load: load a drawing that you previously saved (also prompt the user before discarding the current drawing).

  • Save: save the current drawing using a file format that you determine.

  • Quit: exit the application (prompt the user to save before exiting).

  • About: display a dialog box with the application name, your name and WatID.

4. selection:

  • Selection tool: allows the user to select a shape that has been drawn. To select a shape, the user should click this tool, then click on an existing shape (resulting in some visual indication to the shape itself to indicate that its been selected). Pressing ESC on the keyboard (or clicking an empty part of the canvas) will clear shape selection. Selecting a shape will cause the colour palette, line thickness and style to update their state to reflect the currently selected shape, Changing colour, line thickness or line style when a shape is selected will update the shape to the new values.

  • Erase tool: click on this tool and then click on a shape to remove it. Pressing DEL while a shape is selected should also delete the selected shape.

  • Line drawing tool: select this to draw a line using the selected properties.

  • Circle drawing tool: select this to draw a circle at the point indicated using the selected properties.

  • Rectangle tool: select this to draw a rectangle using the selected properties.

  • Fill tool: select this tool, and click on a shape to change it’s fill colour to the currently selected value.

  • Line colour icon: graphically displays the currently selected line color. Clicking on this object will bring up a color chooser dialog that lets the user pick a color. This colour will be used as the border colour for any new shapes that are drawn (or the ONLY colour in the case of a line).

  • Fill colour icon: graphically displays the currently selected fill color. Clicking on this object will bring up a color chooser dialog that lets the user pick a color. This colour will be used as the fill colour for any new shapes that are drawn (it will NOT be used if a line is being drawn).

  • Line thickness palette: a graphical display of at least three line widths that the user can select. Selecting a line width will set the line thickness or border thickness for any new shapes drawn.

  • Line style palette: a graphical display of solid or dotted lines with at least least three choices. Selecting a line style will set the line style or border style for any new shapes that are drawn.

5. Functions:

  • Drawing: The user draws a shape by selecting the appropriate tool, and clicking on the canvas where they want to start drawing it. The first click typicaly sets the upper-left corner starting position of the shape, and a “preview” is shown as the mouse is dragged. When the mouse button is released, that completes the shape (i.e. the drag operation sets the width of the circle, or creates a line, depending on the shape being drawn, and the shape is completed when the mouse button is released).

  • Selection: The user should be able to select any shape and move it by dragging it with the mouse. Shapes can overlap, with the more recently drawn shape overlapping the older shape (hint: you order them back-to-front as they are created). Your interface should clearly indicate which shape, if any, is selected. You may use thicker borders around the tool, or some other visual indicator that you choose. When a shape is selected, the properties should also change to reflect the shape’s properties.

  • Update shape: Changing the properties of a selected shape should change that shape’s properties.

  • Window resizing: support dynamic resizing of the application window, so that the application adapts to different window sizes and resolutions. If you change the size of the window, the shapes will stay at the same size and position.

  • Scale shapes: change the scale/size of any shape by selecting it, then grabbing a corner of the shape, and dragging to increase/decrease it’s size.

  • Rotate shapes: the ability to grab a corner of a shape and rotate it in real-time.

You might also like...
Android Library to rapidly develop attractive and insightful charts in android applications.
Android Library to rapidly develop attractive and insightful charts in android applications.

williamchart Williamchart is an Android Library to rapidly implement attractive and insightful charts in android applications. Note: WilliamChart v3 h

AirQualityVisualizer is a demo application which is used to display demo for websocket continuous connection andhelps the user to visualize air quality according to city in a graphical format with charts, it is developed using Android Jetpack libraries and MVVM. An open source library used to draw charts in Android with Jetpack Compose with a simple and easy to use
An open source library used to draw charts in Android with Jetpack Compose with a simple and easy to use

android-compose-charts This is an open source library used to draw charts in Android with Jetpack Compose with a simple and easy to use. Just couples

A powerful 🚀 Android range bar chart library as well as scaling, panning and animations.
A powerful 🚀 Android range bar chart library as well as scaling, panning and animations.

RangeBarChart ⚡ Range bar chart library for Android using MPAndroidChart ⚡ There were no charts in MPAndroidChart to show ranges. We were forced to sh

✨ A very Minimal, Sleek and Powerful Graph library for Android using Jetpack Compose
✨ A very Minimal, Sleek and Powerful Graph library for Android using Jetpack Compose

Composable-Graphs ( Jetpack Compose ) ✨ A very Minimal, Sleek and Lightweight Graph library for Android using Jetpack Compose Gradle Setup allprojects

A new canvas drawing library for Android. Aims to be the Fabric.js for Android. Supports text, images, and hand/stylus drawing input. The library has a website and API docs, check it out

FabricView - A new canvas drawing library for Android. The library was born as part of a project in SD Hacks (www.sdhacks.io) on October 3rd. It is cu

A Basic Drawing App which is having Functionality of importing images from your gallery and sharing your drawing via Whatsapp , Email

Drawing-App A Basic Drawing App made in Kotlin Features of the App :) 1.you can set the size of paint Brush 2.import images from gallery 3.share it vi

Drawing App: A simple drawing application that allows the user to draw using a pencil or using shapes
Drawing App: A simple drawing application that allows the user to draw using a pencil or using shapes

Drawing-App Drawing app is a simple drawing application that allows the user to

Theia - A Kotlin program used to analyze and discover backdoors in Minecraft Java 1.12.2 forge mods

Theia A Kotlin program used to analyse and discover backdoors in Minecraft Java

A program analysis tool to find cryptographic misuse in Java and Android.

A program analysis tool to find cryptographic misuse in Java and Android.

Vector map library and writer - running on Android and Desktop.
Vector map library and writer - running on Android and Desktop.

Mapsforge See the integration guide and changelog. And read through how to contribute guidelines. If you have any questions or problems, don't hesitat

Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL.
Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL.

Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL.

🍭🚀💗  Tutorials about animations with Animators, Animated Vector Drawables, Shared Transitions, and more
🍭🚀💗 Tutorials about animations with Animators, Animated Vector Drawables, Shared Transitions, and more

🍭🚀💗 Tutorials about animations with Animators, Animated Vector Drawables, Shared Transitions, and more

Converts SVG and Android Vector Drawable in Jetpack Compose code
Converts SVG and Android Vector Drawable in Jetpack Compose code

SVG to Compose [Experimental] Converts SVG or Android Vector Drawable to Compose code. Android Studio/IntelliJ plugin by overpass Why this project On

A simple gradle plugin that lets you create a download asset from zeplin and convert them to vector drawables automatically
A simple gradle plugin that lets you create a download asset from zeplin and convert them to vector drawables automatically

A simple gradle plugin that lets you create a download asset from zeplin and convert them to vector drawables automatically elephant project using 100% Kotlin and be up and running in a few seconds.

Library containing over 2000 material vector icons that can be easily used as Drawable or as a standalone View.
Library containing over 2000 material vector icons that can be easily used as Drawable or as a standalone View.

Material Icon Library A library containing over 2000 material vector icons that can be easily used as Drawable, a standalone View or inside menu resou

PaintableVectorView enables to change color of paths/groups in Vector Drawable (SVG)
PaintableVectorView enables to change color of paths/groups in Vector Drawable (SVG)

PaintableVectorView PaintableVectorView enables to change color of paths/groups in Vector Drawable (SVG) Demo Car icon made by Prosymbols from www.fla

How to improve the user experience using animated icons with vector drawables on Android
How to improve the user experience using animated icons with vector drawables on Android

Android Animated Icons How to improve the user experience using animated icons with vector drawables on Android English version https://medium.com/@an

Android-Iconics - Use any icon font, or vector (.svg) as drawable in your application.
Android-Iconics - Use any icon font, or vector (.svg) as drawable in your application.

Android-Iconics ... allows to include any icon font with all its vector icons in your project. No limits. Scale with no limit, use any color at any ti

Owner
Bruce Jin
Bruce Jin
A basic chart written by kotlin. Support animation loading, touch event monitoring and JSON data.

A basic chart written by kotlin. Support animation loading, touch event monitoring and JSON data.

null 2 Dec 21, 2022
A powerful 🚀 Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, panning and animations.

⚡ A powerful & easy to use chart library for Android ⚡ Charts is the iOS version of this library Table of Contents Quick Start Gradle Maven Documentat

Philipp Jahoda 36k Dec 31, 2022
Android Graph Library for creating zoomable and scrollable line and bar graphs.

Chart and Graph Library for Android Project maintainer wanted! For time reasons I can not continue to maintain GraphView. Contact me if you are intere

Jonas Gehring 2.7k Jan 5, 2023
Android Graph Library for creating zoomable and scrollable line and bar graphs.

Chart and Graph Library for Android Project maintainer wanted! For time reasons I can not continue to maintain GraphView. Contact me if you are intere

Jonas Gehring 2.7k Jan 2, 2023
An Android chart and graph library

EazeGraph EazeGraph is an Android library for creating beautiful and fancy charts. Its main goal was to create a lighweight library which is easy to u

Paul Cech 1.6k Dec 23, 2022
Android Library to rapidly develop attractive and insightful charts in android applications.

williamchart Williamchart is an Android Library to rapidly implement attractive and insightful charts in android applications. Note: WilliamChart v3 h

Diogo Bernardino 4.9k Dec 30, 2022
Charts/graphs library for Android compatible with API 8+, several chart types with support for scaling, scrolling and animations

HelloCharts for Android Charting library for Android compatible with API 8+(Android 2.2). Works best when hardware acceleration is available, so API 1

Leszek Wach 7.4k Jan 6, 2023
AnyChart Android Chart is an amazing data visualization library for easily creating interactive charts in Android apps. It runs on API 19+ (Android 4.4) and features dozens of built-in chart types.

AnyChart for Android AnyChart Android Charts is an amazing data visualization library for easily creating interactive charts in Android apps. It runs

AnyChart 2k Jan 4, 2023
TChart - Simple and fast charts.

TChart - Simple and fast charts.

null 30 Sep 20, 2022
An android compose library with different Graphs and Charts

plot An android compose library with different Graphs and Charts (currently supports only Line graph, more types will be added soon) Download reposito

Madrapps 106 Dec 30, 2022