Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How To: draw_text, follow_path and liveview #184

Merged
merged 5 commits into from
Sep 22, 2020

Conversation

Wikunia
Copy link
Member

@Wikunia Wikunia commented Sep 17, 2020

PR Checklist

A documentation PR 😄

Link to relevant issue(s)
Close #169

How did you address these issues with this PR? What methods did you use?
I have addressed three questions:

  • How can I show a text being drawn?
  • How can I let an object move along a path?
  • How can I see a live view of the animation?

@Wikunia Wikunia changed the title added draw_text, follow_path and liveview How To: draw_text, follow_path and liveview Sep 17, 2020
@codecov
Copy link

codecov bot commented Sep 17, 2020

Codecov Report

Merging #184 into v0.2 will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             v0.2     #184      +/-   ##
==========================================
+ Coverage   96.84%   96.88%   +0.03%     
==========================================
  Files           8        8              
  Lines         666      803     +137     
==========================================
+ Hits          645      778     +133     
- Misses         21       25       +4     
Impacted Files Coverage Δ
src/Javis.jl 95.91% <0.00%> (+0.57%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1967634...6e17b37. Read the comment docs.

@Wikunia Wikunia linked an issue Sep 17, 2020 that may be closed by this pull request
Copy link
Member

@TheCedarPrince TheCedarPrince left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some general thoughts and comments! Looks good so far. Great work!

Comment on lines 126 to 127
A `text` can appear as every other object with `appear(:fade)` and `appear(:scale)` but it also has a special [`appear`](@ref) functionality called
`:draw_text`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe:

"A text can appear as any other object with appear(:fade) and appear(:scale). However, it also has a special appear functionality called :draw_text."


to let the text `"Hello World!"` appear from left to right in an animated way.

## How can I let an object move along a path?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"How can I let an object move along a path?" -> "How Can I Have an Object Follow a Path?"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in how to all headers are like "How can I let an object move along a path?" atm

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh gotcha - it's just that using the word "let" here sounds awkward in English. Perhaps "How can I have an object follow a path?"


## How can I let an object move along a path?

In this case we need to create a list of points (a path) that the object can follow.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"In this case we need to create a list of points (a path) that the object can follow." -> "We need to create path by providing a list of points that the object can follow."

## How can I let an object move along a path?

In this case we need to create a list of points (a path) that the object can follow.
This can be simple object like a `star` or just a list of points.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"This can be simple object like a star or just a list of points. " -> "The path can be a provided object path such as star or list of points."

Perhaps link to these object paths too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by linking to it?

in this case a star is following the path of a bigger star.
> **NOTE:** the star inside [`follow_path`](@ref) should have the `action=:none` which is the default for most Luxor functions.

Unfortunately the above currently only works for some Luxor functions like `ngon` and `star` but not for `circle` and `rect` as they return `true` instead of the points.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps you could make this a note or warning as well?

]; pathname="follow_path.gif")
```

I admit that this is not the nicest syntax so we might choose to return the points by overriding some Luxor functions in the future.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd remove this or turn it into a note.


I admit that this is not the nicest syntax so we might choose to return the points by overriding some Luxor functions in the future.

Another possibility is to specify a vector of points like in this example:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

" like in this example" -> "like this"

docs/src/howto.md Show resolved Hide resolved
docs/src/howto.md Show resolved Hide resolved
@Wikunia
Copy link
Member Author

Wikunia commented Sep 21, 2020

I either fixed the thing or comment on your review. Feel free to resolve those I fixed correctly and comment or approve regarding the others.

Copy link
Member

@TheCedarPrince TheCedarPrince left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only criticism was on one piece of grammar you can choose if you want. Otherwise, I approve this How To! 😄


to let the text `"Hello World!"` appear from left to right in an animated way.

## How can I let an object move along a path?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh gotcha - it's just that using the word "let" here sounds awkward in English. Perhaps "How can I have an object follow a path?"

@Wikunia Wikunia merged commit 017896c into v0.2 Sep 22, 2020
@Wikunia Wikunia deleted the wik-documentation-howto-v0.2 branch September 22, 2020 17:14
TheCedarPrince added a commit that referenced this pull request Sep 25, 2020
* Wik feature progressmeter (#137)

* Merged the latest master into v0.2
* Using ProgressMeter

* VideoIO to render mp4 without saving temp frames (#138)

* first version of VideoIO with mp4

* fixing links in documentation (#144) (#145)

* fixing links in documentation (#144)

* first version of HowTo (#142)

* Using Animations.jl (#125)

* first version of Animations.jl

* don't allow v2.5 of Luxor because of transposing (#149)

* Wik documentation howto (#148)

* made review changes for HowTo

* docstrings for structs (#150)

* Forgot to push sethue to Animations.jl (#153)

* allow sethue in Animations.jl
* allow 2.5.1 of Luxor
* added extra line for an example of `sethue`

* merge master in v0.2

* Format file for the repository

* Removing old contributing file

* Added info on dependencies and JuliaFormatter

* Revert "merge master in v0.2"

This reverts commit a853a0f.

* Revert files to a853a0f

* Tutorial animations (#157)

* Animation tutorial

* Wik feature morphing v2 (#154)

* ability to morph with fill.

* [WIP] Live Preview (#119)

* Starting proof of concept on live preview

* Reverted Javis.jl to previous formatting

* Began work on proof of concept

* Beginning of the javis image viewer

* Continued work on trying to preview images

* Barebones example of GTK image viewer

* get_javis_frame function

* Added compat for images and updated authors

* Proof of concept javis viewer signal emission

* Temporary fix for Image compat

* Added buttons and todos

* Added functionality for buttons

* Fixed up Project TOML for compat with Images

* Fixed merge conflict logic bug

* Got proof of concept of live viewer working

* Beginning clean up of javis image viewer

* Added ColorTypes and color conversion for frames

* Added ColorTypes dependency

* Cleaned up and adding documentation strings

* Exported get_javis_frame function

* Prepped javis viewer for full integration into Javis

* Added Gtk and GtkReactive deps

* Added liveview kwarg

* Finished prototype of javis viewer

* Updated boundaries for deps

* Clarified docstrings

* Added arrow key navigation through frames

* Updated boundaries per Ole suggestion

* Fixed up formatting for CI

* Made live rendering faster

* Added loop around functionality

* Adjusted boundaries of deps

* Increased speed of image preview display

* Functionalized repeated code snippets

* Bug in javis viewer - identification attempt

* Made javis viewer work completely

* Reversion to a6fa540

* Made short circuit eval of live viewer

* Documented javis viewer thoroughly

* Added docstring

* Qualified usage of LightXML.value func

* Qualified textbox usage

* Formatting... 👀

* test with xvfb on ubuntu

* without --project

* try with project=.

* different idea using DISPLAY

* fix Documentation CI

* Added documentation for get_javis_frame

* Reduced code reuse

* Added some clarifications

* Removed export of get_javis_frame

* Changed returns for testing

* Added GtkReactive to Project

* Tests for javis_viewer

* Formatting again

* Final test case for increment/decrement tests

* Formatting test file

* Final clean up to javis viewer

Co-authored-by: Ole Kröger <[email protected]>

* removed possibility to set the fontsize inside the latex function (#180)

* removed possibility to set the fontsize inside the latex function

* ability to animate text (#162)

* ability to animate text

* Let us follow a path (#163)

* Let us follow a path

* push preview (#182)

* Update Change Log (#183)

* Added info about live viewer and javis frame

* Added info about drawing text

* Improved Action Error Msg (#185)

* Added error msg about defining Video first

* Added unit test and cleaned up code

* How To:  draw_text, follow_path and liveview (#184)

* added draw_text, follow_path and liveview in HowTo

* return 1.0 in interpolation for single frame (#188)

* [Bugfix] scaling to 0 (#191)

* don't ever scale to 0 :D

* [Bugfix] Follow path starting after first frame (#192)

* bugfix for follow_path if not on first frame

* Drafted showcase table for README

* Images for drafted showcase

* Formatted tables for showcase

* Wik examples follow path (#198)

* first version of an examples folder: drawing a car

* convert frame only once (#199)

* no need to convert to ARGB32

* refactoring (#194)

* refactoring

* merge fix renaming

* resolved typos

* Added back headers for table

* Update for Tutorial 5 (#200)

* Remove any files stored in test/images (#195)

* Remove any files stored in test/images

* Removed file check and created it as a unit test

* Unit test for test/images dir to check for additional files

* Added formatting

* Began update of tutorial 5

* Updated gifs

* Fixed gifs

* Added additional explanation on SubAction

* Merged unit with v0.2

* Added example of drawing a path

* Resized gif to 350 x 350

* fixed tutorial links in readme

* Changed compat entries to allow more (#202)

* changed compat entries to allow more

* changelog ready for merge

* Tutorial overhaul (#201)

* explaining Action and Scaling and fixing some others

* removed some "The"

* emoji fixes and some other small things

* Corrected grammar and some light editing

* Fixed some grammar issues

Co-authored-by: Jacob Zelko <[email protected]>

* Added Examples Page (#203)

* Added examples page link

* Added bezier path gif

* Drafted first table for examples

* Rendered examples properly

* Added explanation for example

* Fixed reference

Co-authored-by: Jacob Zelko <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How To's for Paths and Text
2 participants