Commit Graph

10 Commits

Author SHA1 Message Date
caleb
1188e285fa Implement outline view mode (#401)
* Created wasm binding to action's of the radio buttons which control the view mode
Added entry to DocumentMessage Enum

* draw in wireframe mode by changing parameters on each shape
added functions/changed behavior to do as above
not working yet
   - newly added shapes should be drawn in wireframe
   - setting fill to "none" on a path does not only draw an outline
      - maybe the stroke width is 0?

* Wire frame view mostly functional for ellipses
   - Need to implement for all shapes
   - BUG: shapes don't immediatley update upon changing view-mode

* Fixed: active document now updates after view mode swap

* The Pros:
   - wire frame mode effects all shapes correctly

The Cons:
   - wire frame mode effects everything, including things that maybe shouldn't be, like select boxes and pen lines

* wire frame view no longer effects overlay layers

* Fixed: While in wireframe view the pen tool will draw regular thickness lines.

* some commenting

* Fixed potential bug:
   In layer/file system with a Folder layer with a sub-layer that is also
   a Folder cache_dirty must be set in order for all shapes to update properly

* refactored code to use ViewMode enum names throughout

* Changed: All wireframe lines are blank
cargo fmt

* Wireframe thickness doesn't change as a result of zooming
   - Added DocumentMessage::ReRenderDocument, which marks layers as dirty and renders with the updated render-string
   - All "zoom" messages in the movement_handler send a re-render message
   - while in wireframe view, the "render-transform" of all shapes includes the root layer transform

Added getter/setter methods for graphene::Document::view_mode

* cargo fmt

* wireframe now has proper thickness after "Zoom Canvas to Fit all" action

* Refactored
   - Changed FrontendMessage::UpdateCanvas to RenderDocument message to allow for lazy evaluation
   - Created DocumentOperation::SetViewMode to be more consistent with existing code
   - removed log statement
   - Added constants for empty fill and thin-black stroke

* cargo fmt

* Removed ReRenderDocument message

* cargo fmt

* Fixes as suggested by TrueDoctor

* clean up merge
cargo fmt

* Refactor:
   moved view_mode to DocumentMessageHandler

* Polishing

* changed those two comments

* Remove unknown todo comment

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2021-12-24 15:04:58 -08:00
Keavon Chambers
ef93bed0ec Update terminology in the docs 2021-08-12 00:39:29 -07:00
Keavon Chambers
fbf2c012c3 Restructure project directories (#333)
`/client/web` -> `/frontend`
`/client/cli` -> *delete for now*
`/client/native` -> *delete for now*
`/core/editor` -> `/editor`
`/core/document` -> `/graphene`
`/core/renderer` -> `/charcoal`
`/core/proc-macro` -> `/proc-macros` *(now plural)*
2021-08-07 05:17:18 -07:00
Keavon Chambers
bc733acb4c Fix tooltips in Document panel 2021-07-19 18:02:08 -07:00
Keavon Chambers
e28b5575f7 Add design documentation about user input and masking 2021-05-07 02:47:38 -07:00
Keavon Chambers
7c6ab1f327 Rename the "Layers" panel to "Layer Graph" 2021-04-01 21:58:28 -07:00
Keavon Chambers
b5cd8327dd Change document, viewport, and canvas terminology 2021-03-29 03:52:08 -07:00
Keavon Chambers
4035138044 Add asset manager sources to docs outline 2021-03-27 12:57:18 -07:00
Keavon Chambers
479d2856c6 Various small fixes; no longer lint on Vue CLI run 2021-03-27 02:26:55 -07:00
Keavon Chambers
2613ded439 Rename more of the project structure. Fixes #39. 2021-03-27 02:26:55 -07:00