GithubHelp home page GithubHelp logo

vpaint's People

Contributors

pisaiah avatar spytheman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

spytheman

vpaint's Issues

Todo list

vPaint Todo List

Format support

  • PNG support
  • JPEG support
  • WEBP support
  • QOI support
  • Saving / Loading
  • Saving / Loading on Wasm.

Zoom support

  • Ability to zoom image (25% - 800%+)
  • Draw canvas without image blending
  • Zoom slider, instead of buttons.

Editing

  • Layer support
    • movable layers
  • Brushes
    • Pencil Brush
    • Calligraphy Brush (Right Facing)
    • Calligraphy Brush (Left Facing)
    • Use line algorithm for drawing. .
    • Spray-can Brush
    • Paint bucket
    • Eraser
  • Shapes
    • Rectangle
    • Square
    • Line
    • Triangle
    • Circle
    • Rounded Rectangle
  • Colors
    • Basic color table selection
    • RGB color selection
    • Primary / Secondary Colors.

Canvas

  • Resizable
  • Resizable (by drag)
  • Skew
  • Rotate

App starts normal, but switches to something that looks like a design/debug mode

vpaint

Issue:

Appearance changes after running executable a few seconds. This was after running a few times with NO error. Also, warnings during build

Build Output (home path redacted):

src/image_view.v:9:1: notice: [attr] has been deprecated, use @[attr] instead
7 | import os
8 |
9 | [heap]
| ^
10 | struct ImageViewData {
11 | mut:
src/paint.v:8:1: notice: [attr] has been deprecated, use @[attr] instead
6 | import gx
7 |
8 | [heap]
| ^
9 | struct App {
10 | mut:
src/tools_fillcan.v:5:8: warning: module 'time' is imported but never used
3 | import iui as ui
4 | import gx
5 | import time
| ~~~~
6 |
7 | // Fill Tool
~/.vmodules/iui/src/deprecated_stuff.v:22:3: notice: assigning 0 to a reference field is only allowed in unsafe blocks
20 | return &MenuItem{
21 | text: text
22 | icon: 0
| ~~~~~~~
23 | click_event_fn: fn (mut win Window, item MenuItem) {}
24 | }
~/.vmodules/iui/src/image.v:43:3: notice: assigning 0 to a reference field is only allowed in unsafe blocks
41 | mut img := &Image{
42 | text: ''
43 | img: 0
| ~~~~~~
44 | width: width
45 | height: h
~/.vmodules/iui/src/modal.v:39:3: notice: assigning 0 to a reference field is only allowed in unsafe blocks
37 | in_width: 500
38 | in_height: 300
39 | close: 0
| ~~~~~~~~
40 | }
41 | }
~/.vmodules/iui/src/page.v:40:3: notice: assigning 0 to a reference field is only allowed in unsafe blocks
38 | text_cfg: draw_cfg()
39 | in_height: 300
40 | close: 0
| ~~~~~~~~
41 | }
42 | }
~/.vmodules/iui/src/ui.v:314:3: notice: assigning 0 to a reference field is only allowed in unsafe blocks
312 | pub fn Window.new(cfg &WindowConfig) &Window {
313 | mut win := &Window{
314 | gg: 0
| ~~~~~
315 | theme: cfg.theme
316 | bar: 0
~/.vmodules/iui/src/ui.v:316:3: notice: assigning 0 to a reference field is only allowed in unsafe blocks
314 | gg: 0
315 | theme: cfg.theme
316 | bar: 0
| ~~~~~~
317 | config: cfg
318 | font_size: cfg.font_size
~/.vmodules/iui/src/ui.v:319:3: notice: assigning 0 to a reference field is only allowed in unsafe blocks
317 | config: cfg
318 | font_size: cfg.font_size
319 | graphics_context: 0
| ~~~~~~~~~~~~~~~~~~~
320 | }
321 |
src/color_picker.v:48:25: notice: accessing a pointer map value requires an or {} block outside unsafe
46 | mut cim := 0
47 | if 'HSL' in win.id_map {
48 | hsl := &int(win.id_map['HSL'])
| ~~~~~~~
49 | cim = *hsl
50 | }
src/color_picker.v:48:25: notice: accessing map value that contain pointers requires an or {} block outside unsafe
46 | mut cim := 0
47 | if 'HSL' in win.id_map {
48 | hsl := &int(win.id_map['HSL'])
| ~~~~~~~
49 | cim = *hsl
50 | }
src/image_view.v:322:3: notice: assigning 0 to a reference field is only allowed in unsafe blocks
320 | pub fn image_from_data(data &ImageViewData) &Image {
321 | return &Image{
322 | app: 0
| ~~~~~~
323 | data: data
324 | img: data.id
src/color_picker.v:52:16: warning: function iui.button_with_icon has been deprecated; Use Button.new(ButtonConfig)
50 | }
51 |
52 | mut btn := ui.button_with_icon(cim)
| ~~~~~~~~~~~~~~~~~~~~~
53 | btn.set_area_filled(false)
54 | btn.after_draw_event_fn = hsl_btn_draw_evnt
src/color_picker.v:80:21: warning: method iui.Modal.create_close_btn has been deprecated
78 | modal.add_child(aslid)
79 |
80 | mut close := modal.create_close_btn(mut win, false)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
81 | y := 295
82 |
src/color_picker.v:86:19: warning: method iui.Modal.create_close_btn has been deprecated
84 | close.set_bounds(16, y, 216, 30)
85 |
86 | mut can := modal.create_close_btn(mut win, true)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
87 | can.text = 'Cancel'
88 | can.set_bounds(245, y, 200, 30)
src/color_picker.v:308:2: warning: unused variable: y
306 | win.gg.draw_rounded_rect_empty(x - 1, cp.my - 8 + com.ry, 16, 16, 32, gx.blue)
307 |
308 | y := cp.btn.ry - 32
| ^
309 |
310 | ty := cp.btn.ry + cp.btn.height + 4
src/color_picker.v:316:2: warning: unused variable: tcolor
314 | win.gg.draw_rect_filled(cp.btn.rx, ty, cp.bw, 24, cp.color)
315 |
316 | tcolor := gx.rgb(255 - cp.color.r, 255 - cp.color.g, 255 - cp.color.b)
| ~~~~~~
317 |
318 | br := f32(cp.color.r) * 299
src/image_save.v:127:19: warning: method iui.Modal.create_close_btn has been deprecated
125 |
126 | mut win := app.win
127 | mut can := modal.create_close_btn(mut win, true)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
128 | can.text = 'Cancel'
129 | can.set_bounds(w - 140, y, 130, 30)
src/image_save.v:96:2: warning: unused variable: bw
94 | modal.add_child(close)
95 | y := 250
96 | bw := 210
| ~~
97 |
98 | close.subscribe_event('mouse_up', fn [app, mut data, mut cb, mut f, mut nam] (mut e ui.MouseEvent) {
src/image_save.v:98:59: warning: unused variable: cb
96 | bw := 210
97 |
98 | close.subscribe_event('mouse_up', fn [app, mut data, mut cb, mut f, mut nam] (mut e ui.MouseEvent) {
| ~~
99 | full_path := os.join_path(f.text, nam.text)
100 | typ := os.file_ext(full_path).to_lower()
src/menubar.v:154:18: warning: function iui.menuitem has been deprecated; Replaced with menu_item(MenuItemConfig)
152 | mut themes := ui.get_all_themes()
153 | for theme2 in themes {
154 | mut item := ui.menuitem(theme2.name)
| ~~~~~~~~~~~~~~~~~~~~~
155 | item.set_click(theme_click)
156 | theme_menu.add_child(item)
src/paint.v:46:19: warning: function iui.make_window has been deprecated; Use Window.new
44 | fn main() {
45 | // Create Window
46 | mut window := ui.make_window(
| ~~~~~~~~~~~~
47 | title: 'vPaint'
48 | width: 700
src/ribbon.v:29:7: warning: method iui.Button.set_click_fn has been deprecated; use subscribe_event
27 | btn.border_radius = 32
28 |
29 | btn.set_click_fn(cbc, color)
| ~~~~~~~~~~~~~~~~~~~~~~~~
30 | color_box.add_child(btn)
31 | count += 1
src/ribbon.v:73:16: warning: function iui.button_with_icon has been deprecated; Use Button.new(ButtonConfig)
71 | gg_im := gg.create_image_from_byte_array(data) or { panic(err) }
72 | cim := gg.cache_image(gg_im)
73 | mut btn := ui.button_with_icon(cim)
| ~~~~~~~~~~~~~~~~~~~~~
74 |
75 | btn.set_bounds(0, 16, 32, 32)
src/ribbon.v:77:6: warning: method iui.Button.set_click_fn has been deprecated; use subscribe_event
75 | btn.set_bounds(0, 16, 32, 32)
76 |
77 | btn.set_click_fn(rgb_btn_click, 0)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
78 | return btn
79 | }
src/ribbon.v:23:6: warning: unused variable: count
21 | size := 24
22 |
23 | mut count := 0
| ~~~~~
24 | for color in colors {
25 | mut btn := ui.Button.new(text: ' ')
src/ribbon.v:93:3: warning: unused variable: id
91 | mut app := win.get&App
92 | bg := if com.text == '' { app.color } else { app.color_2 }
93 | id := if com.text == '' { '1' } else { '2' }
| ~~
94 | com.set_background(bg)
95 | sele := (com.text == ' ' && app.sele_color) || (com.text == '' && !app.sele_color)
src/sidebar.v:41:8: warning: method iui.Button.set_click_fn has been deprecated; use subscribe_event
39 | img_resize_file := $embed_file('assets/resize.png')
40 | mut test5 := app.icon_btn(img_resize_file.to_bytes(), &SelectTool{})
41 | test5.set_click_fn(fn (win &ui.Window, b voidptr, c voidptr) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
42 | mut app := win.get&App
43 | app.show_resize_modal(app.canvas.w, app.canvas.h)
src/sidebar.v:128:16: warning: function iui.button_with_icon has been deprecated; Use Button.new(ButtonConfig)
126 | gg_im := gg.create_image_from_byte_array(data) or { panic(err) }
127 | cim := gg.cache_image(gg_im)
128 | mut btn := ui.button_with_icon(cim)
| ~~~~~~~~~~~~~~~~~~~~~
129 |
130 | btn.set_bounds(2, 0, 46, 32)
src/sidebar.v:138:6: warning: method iui.Button.set_click_fn has been deprecated; use subscribe_event
136 | btn.extra = tool.tool_name
137 |
138 | btn.set_click_fn(tool_btn_click, tool)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
139 | return btn
140 | }
src/statusbar.v:27:11: warning: method iui.Button.set_click_fn has been deprecated; use subscribe_event
25 |
26 | mut zoom_inc := app.zoom_btn(1)
27 | zoom_inc.set_click_fn(on_zoom_inc_click, app)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28 | zoom_inc.set_bounds(1, 0, 40, 25)
29 |
src/statusbar.v:31:11: warning: method iui.Button.set_click_fn has been deprecated; use subscribe_event
29 |
30 | mut zoom_dec := app.zoom_btn(0)
31 | zoom_dec.set_click_fn(on_zoom_dec_click, app)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 | zoom_dec.set_bounds(4, 0, 40, 25)
33 |
src/tools_fillcan.v:28:13: warning: method []Point.free must be called from an unsafe block
26 | if this.next.len > 0 {
27 | this.next.clear()
28 | this.next.free()
| ~~~~~~
29 | free(this.next)
30 | this.next = []Point{}
src/tools_fillcan.v:29:3: warning: function free must be called from an unsafe block
27 | this.next.clear()
28 | this.next.free()
29 | free(this.next)
| ~~~~~~~~~~~~~~~
30 | this.next = []Point{}
31 | this.img.refresh()

Command prompt opens when app runs

Like the continual development of vPaint. On Windows, when running vPaint from the zip file, you get the black box/command prompt window. Would be great if that issue is fixed.

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.