diff --git a/selection.cpp b/selection.cpp index 1210fcc..93f9457 100644 --- a/selection.cpp +++ b/selection.cpp @@ -236,6 +236,11 @@ void Selection::paint(QPainter &painter, qreal zoom, QRectF region __attribute__ void Selection::transform(QTransform transform, int pageNum) { m_selectionPolygon = transform.map(m_selectionPolygon); + + qreal sx = transform.m11(); + qreal sy = transform.m22(); + qreal s = (sx + sy) / 2.0; + for (int i = 0; i < m_strokes.size(); ++i) { m_strokes[i].points = transform.map(m_strokes[i].points); @@ -245,10 +250,19 @@ void Selection::transform(QTransform transform, int pageNum) */ if (transform.determinant() != 1) { - qreal s = (transform.m11() + transform.m22()) / 2.0; m_strokes[i].penWidth = m_strokes[i].penWidth * s; } } + if (transform.determinant() != 1) + { + m_x_padding *= sx; + m_y_padding *= sy; + } + if (transform.isRotating()) + { + m_x_padding = m_padding; + m_y_padding = m_padding; + } m_angle = 0.0; @@ -260,10 +274,11 @@ void Selection::finalize() QRectF boundingRect; for (int i = 0; i < m_strokes.size(); ++i) { - boundingRect = boundingRect.united(m_strokes[i].points.boundingRect()); + boundingRect = boundingRect.united(m_strokes[i].boundingRectSansPenWidth()); } // boundingRect.adjust(-m_ad, -m_ad, m_ad, m_ad); + boundingRect.adjust(-m_x_padding, -m_y_padding, m_x_padding, m_y_padding); m_selectionPolygon = QPolygonF(boundingRect); setWidth(boundingRect.width()); diff --git a/selection.h b/selection.h index 20c395b..c0f48c0 100644 --- a/selection.h +++ b/selection.h @@ -56,6 +56,10 @@ class Selection : public Page qreal m_ad = 10; + qreal static constexpr m_padding = 10.0; + qreal m_y_padding = m_padding; + qreal m_x_padding = m_padding; + qreal m_angle = 0.0; QPolygonF m_selectionPolygon; diff --git a/stroke.cpp b/stroke.cpp index 3b55921..e4bfad3 100644 --- a/stroke.cpp +++ b/stroke.cpp @@ -55,8 +55,7 @@ void Stroke::paint(QPainter &painter, qreal zoom, bool last) QRectF Stroke::boundingRect() const { - QPolygonF tmpPoints = points; - QRectF bRect = tmpPoints.boundingRect(); + QRectF bRect = boundingRectSansPenWidth(); qreal maxPressure = 0.0; for (qreal p : pressures) { @@ -68,4 +67,16 @@ QRectF Stroke::boundingRect() const qreal pad = maxPressure * penWidth; return bRect.adjusted(-pad, -pad, pad, pad); } + +QRectF Stroke::boundingRectSansPenWidth() const +{ + QPolygonF tmpPoints = points; + QRectF bRect = tmpPoints.boundingRect(); + if (bRect.isNull()) + { + qreal ad = 0.0001; + bRect.adjust(-ad,-ad,ad,ad); + } + return bRect; +} } diff --git a/stroke.h b/stroke.h index 499e007..0128ccb 100644 --- a/stroke.h +++ b/stroke.h @@ -23,6 +23,7 @@ struct Stroke void paint(QPainter &painter, qreal zoom, bool last = false); QRectF boundingRect() const; + QRectF boundingRectSansPenWidth() const; QPolygonF points; QVector pressures; diff --git a/website/.gitignore b/website/.gitignore new file mode 100644 index 0000000..45c1505 --- /dev/null +++ b/website/.gitignore @@ -0,0 +1,3 @@ +_site +.sass-cache +.jekyll-metadata diff --git a/website/MrWriterDoc.adoc b/website/MrWriterDoc.adoc new file mode 100644 index 0000000..d394485 --- /dev/null +++ b/website/MrWriterDoc.adoc @@ -0,0 +1,114 @@ +--- +layout: page +title: Documentation +permalink: /documentation/ +weight: 3 +--- + +:toc: +:toc-placement: preamble +:sectnums!: +:data-uri: +:experimental: + += MrWriter + +MrWriter is a programm aimed at replacing pen and paper for note taking as well as blackboards in schools and universities. +You can find the newest version at http://github.com/unruhschuh/MrWriter[MrWriter] + +== Users Guide + +=== Tools + +[[ToolsTable]] +.Tools +[cols="^.^1,<.^1,.^100", options="header"] +|=== +| Icon +| Name +| Function + +| image:../images/penIcon.png[width=32] +| Pen +| Draw freehand lines. If you use a Wacom style pen, lines change their width with respect to pressure. + +| image:../images/rulerIcon.png[width=32] +| Ruler +| Draw straight lines. + +| image:../images/circleIcon.png[width=32] +| Circle +| Draw circles starting at the center and defining the radius. + +| image:../images/eraserIcon.png[width=32] +| Eraser +| Erase strokes. Hold the kbd:[Shift] key to erase freely. + +| image:../images/selectIcon.png[width=32] +| Select +| Select strokes. If selected, strokes can be moved, copied, cut, and rotated. + +| image:../images/handIcon.png[width=32] +| Hand +| Move the document around. +|=== + +== Keyboard shortcuts + +MrWriter makes excessive use of keyboard shortcuts. The table <> shows a complete list of all shortcuts. + +[[ShortcutsTable]] +.Shortcuts +[cols="1,1",options="header"] +|==================== +| Action +| Shortcut + +| Choose Pen +| kbd:[1] + +| Choose Ruler +| kbd:[2] + +| Choose Circle +| kbd:[3] + +| Choose Eraser +| kbd:[4] + +| Choose Select +| kbd:[5] + +| Choose Hand +| kbd:[6] + +| Erase freely +| hold kbd:[Shift] while using the Eraser Tool + +| Save File +| kbd:[Ctrl] / kbd:[Cmd+s] on Windows and Linux + +| Black +| kbd:[Q] + +| Red +| kbd:[W] + +| Green +| kbd:[E] + +| Blue +| kbd:[R] + +| Toggle Toolbar +| kbd:[T] + +| Toggle Fullscreen +| kbd:[F] + +| Toggle Statusbar +| kbd:[S] + +| Pen Width +| kbd:[Ctrl]/kbd:[Cmd+1] through kbd:[5] +|==================== diff --git a/website/_config.yml b/website/_config.yml new file mode 100644 index 0000000..4e9a4e4 --- /dev/null +++ b/website/_config.yml @@ -0,0 +1,28 @@ +# Welcome to Jekyll! +# +# This config file is meant for settings that affect your whole blog, values +# which you are expected to set up once and rarely need to edit after that. +# For technical reasons, this file is *NOT* reloaded automatically when you use +# 'jekyll serve'. If you change this file, please restart the server process. + +# Site settings +title: MrWriter +author: Thomas Leitz +email: thomas.leitz@web.de +#description: > # this means to ignore newlines until "baseurl:" +# Write an awesome description for your new site here. You can edit this +# line in _config.yml. It will appear in your document head meta (for +# Google search results) and in your feed.xml site description. +baseurl: "" # the subpath of your site, e.g. /blog +url: "http://mrwriter.org" # the base hostname & protocol for your site +twitter_username: unruhschuh +github_username: unruhschuh + +# Build settings +markdown: kramdown +#markdown: redcarpet +#redcarpet: +# extensions: ["no_intra_emphasis", "fenced_code_blocks", "autolink", "tables", "strikethrough", "superscript", "with_toc_data"] + +gems: + - jekyll-asciidoc diff --git a/website/_includes/footer.html b/website/_includes/footer.html new file mode 100644 index 0000000..b9360d9 --- /dev/null +++ b/website/_includes/footer.html @@ -0,0 +1,38 @@ +
+ +
+ + + + + +
+ +
diff --git a/website/_includes/head.html b/website/_includes/head.html new file mode 100644 index 0000000..41340ae --- /dev/null +++ b/website/_includes/head.html @@ -0,0 +1,12 @@ + + + + + + {% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %} + + + + + + diff --git a/website/_includes/header.html b/website/_includes/header.html new file mode 100644 index 0000000..c725986 --- /dev/null +++ b/website/_includes/header.html @@ -0,0 +1,28 @@ + diff --git a/website/_includes/icon-github.html b/website/_includes/icon-github.html new file mode 100644 index 0000000..e501a16 --- /dev/null +++ b/website/_includes/icon-github.html @@ -0,0 +1 @@ +{% include icon-github.svg %}{{ include.username }} diff --git a/website/_includes/icon-github.svg b/website/_includes/icon-github.svg new file mode 100644 index 0000000..4422c4f --- /dev/null +++ b/website/_includes/icon-github.svg @@ -0,0 +1 @@ + diff --git a/website/_includes/icon-twitter.html b/website/_includes/icon-twitter.html new file mode 100644 index 0000000..e623dbd --- /dev/null +++ b/website/_includes/icon-twitter.html @@ -0,0 +1 @@ +{{ include.username }} diff --git a/website/_includes/icon-twitter.svg b/website/_includes/icon-twitter.svg new file mode 100644 index 0000000..dcf660e --- /dev/null +++ b/website/_includes/icon-twitter.svg @@ -0,0 +1 @@ + diff --git a/website/_layouts/default.html b/website/_layouts/default.html new file mode 100644 index 0000000..e4ab96f --- /dev/null +++ b/website/_layouts/default.html @@ -0,0 +1,20 @@ + + + + {% include head.html %} + + + + {% include header.html %} + +
+
+ {{ content }} +
+
+ + {% include footer.html %} + + + + diff --git a/website/_layouts/page.html b/website/_layouts/page.html new file mode 100644 index 0000000..ce233ad --- /dev/null +++ b/website/_layouts/page.html @@ -0,0 +1,14 @@ +--- +layout: default +--- +
+ +
+

{{ page.title }}

+
+ +
+ {{ content }} +
+ +
diff --git a/website/_layouts/post.html b/website/_layouts/post.html new file mode 100644 index 0000000..3a0fb52 --- /dev/null +++ b/website/_layouts/post.html @@ -0,0 +1,15 @@ +--- +layout: default +--- +
+ +
+

{{ page.title }}

+ +
+ +
+ {{ content }} +
+ +
diff --git a/website/_posts/2016-01-24-welcome-to-jekyll.markdown b/website/_posts/2016-01-24-welcome-to-jekyll.markdown new file mode 100644 index 0000000..381d947 --- /dev/null +++ b/website/_posts/2016-01-24-welcome-to-jekyll.markdown @@ -0,0 +1,25 @@ +--- +layout: post +title: "Welcome to Jekyll!" +date: 2016-01-24 10:06:05 +0100 +categories: jekyll update +--- +You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated. + +To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works. + +Jekyll also offers powerful support for code snippets: + +{% highlight ruby %} +def print_hi(name) + puts "Hi, #{name}" +end +print_hi('Tom') +#=> prints 'Hi, Tom' to STDOUT. +{% endhighlight %} + +Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk]. + +[jekyll-docs]: http://jekyllrb.com/docs/home +[jekyll-gh]: https://github.com/jekyll/jekyll +[jekyll-talk]: https://talk.jekyllrb.com/ diff --git a/website/_sass/_base.scss b/website/_sass/_base.scss new file mode 100644 index 0000000..2288a2b --- /dev/null +++ b/website/_sass/_base.scss @@ -0,0 +1,246 @@ +/** + * Reset some basic elements + */ +body, h1, h2, h3, h4, h5, h6, +p, blockquote, pre, hr, +dl, dd, ol, ul, table, td, th, figure { + margin: 0; + padding: 0; +} + + + +/** + * Basic styling + */ +body { + font: $base-font-weight #{$base-font-size}/#{$base-line-height} $base-font-family; + color: $text-color; + background-color: $background-color; + -webkit-text-size-adjust: 100%; + -webkit-font-feature-settings: "kern" 1; + -moz-font-feature-settings: "kern" 1; + -o-font-feature-settings: "kern" 1; + font-feature-settings: "kern" 1; + font-kerning: normal; +} + + + +/** + * Set `margin-bottom` to maintain vertical rhythm + */ +h1, h2, h3, h4, h5, h6, +p, blockquote, pre, +ul, ol, dl, figure, +%vertical-rhythm { + margin-bottom: $spacing-unit / 2; +} + + + +/** + * Images + */ +img { + max-width: 100%; + vertical-align: middle; +} + + + +/** + * Figures + */ +figure > img { + display: block; +} + +figcaption { + font-size: $small-font-size; +} + + + +/** + * Lists + */ +ul, ol { + margin-left: $spacing-unit; +} + +li { + > ul, + > ol { + margin-bottom: 0; + } +} + +/** + * Tables + */ + +table { + border-collapse: collapse; + border-spacing: 0; + border: 1px solid #373737; + margin-bottom: 20px; + text-align: left; +} + +th { + padding: 10px; + background: #373737; + color: #fff; +} + +td { + padding: 10px; + border: 1px solid #373737; +} + +/** + * Headings + */ +h1, h2, h3, h4, h5, h6 { + font-weight: $base-font-weight; +} + + + +/** + * Links + */ +a { + color: $brand-color; + text-decoration: none; + + &:visited { + color: darken($brand-color, 15%); + } + + &:hover { + color: $text-color; + text-decoration: underline; + } +} + + + +/** + * Blockquotes + */ +blockquote { + color: $grey-color; + border-left: 4px solid $grey-color-light; + padding-left: $spacing-unit / 2; + font-size: 18px; + letter-spacing: -1px; + font-style: italic; + + > :last-child { + margin-bottom: 0; + } +} + + + +/** + * Code formatting + */ +pre, +code { + font-size: 15px; + border: 1px solid $grey-color-light; + border-radius: 3px; + background-color: #eef; +} + +code { + padding: 1px 5px; +} + +pre { + padding: 8px 12px; + overflow-x: auto; + + > code { + border: 0; + padding-right: 0; + padding-left: 0; + } +} + + + +/** + * Wrapper + */ +.wrapper { + max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit} * 2)); + max-width: calc(#{$content-width} - (#{$spacing-unit} * 2)); + margin-right: auto; + margin-left: auto; + padding-right: $spacing-unit; + padding-left: $spacing-unit; + @extend %clearfix; + + @include media-query($on-laptop) { + max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit})); + max-width: calc(#{$content-width} - (#{$spacing-unit})); + padding-right: $spacing-unit / 2; + padding-left: $spacing-unit / 2; + } +} + + + +/** + * Clearfix + */ +%clearfix { + + &:after { + content: ""; + display: table; + clear: both; + } +} + + + +/** + * Icons + */ +.icon { + + > svg { + display: inline-block; + width: 16px; + height: 16px; + vertical-align: middle; + + path { + fill: $grey-color; + } + } +} + + +/** + * by me + */ +.center-image +{ + margin: 0 auto; + display: block; +} + +p.tableblock { + vertical-align: middle; + text-align: left; +} + +table td p:first-child {margin: 0;} + +kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap} diff --git a/website/_sass/_layout.scss b/website/_sass/_layout.scss new file mode 100644 index 0000000..9cbfdde --- /dev/null +++ b/website/_sass/_layout.scss @@ -0,0 +1,242 @@ +/** + * Site header + */ +.site-header { + border-top: 5px solid $grey-color-dark; + border-bottom: 1px solid $grey-color-light; + min-height: 56px; + + // Positioning context for the mobile navigation icon + position: relative; +} + +.site-title { + font-size: 26px; + font-weight: 300; + line-height: 56px; + letter-spacing: -1px; + margin-bottom: 0; + float: left; + + &, + &:visited { + color: $grey-color-dark; + } +} + +.site-nav { + float: right; + line-height: 56px; + + .menu-icon { + display: none; + } + + .page-link { + color: $text-color; + line-height: $base-line-height; + + // Gaps between nav items, but not on the last one + &:not(:last-child) { + margin-right: 20px; + } + } + + @include media-query($on-palm) { + position: absolute; + top: 9px; + right: $spacing-unit / 2; + background-color: $background-color; + border: 1px solid $grey-color-light; + border-radius: 5px; + text-align: right; + + .menu-icon { + display: block; + float: right; + width: 36px; + height: 26px; + line-height: 0; + padding-top: 10px; + text-align: center; + + > svg { + width: 18px; + height: 15px; + + path { + fill: $grey-color-dark; + } + } + } + + .trigger { + clear: both; + display: none; + } + + &:hover .trigger { + display: block; + padding-bottom: 5px; + } + + .page-link { + display: block; + padding: 5px 10px; + + &:not(:last-child) { + margin-right: 0; + } + margin-left: 20px; + } + } +} + + + +/** + * Site footer + */ +.site-footer { + border-top: 1px solid $grey-color-light; + padding: $spacing-unit 0; +} + +.footer-heading { + font-size: 18px; + margin-bottom: $spacing-unit / 2; +} + +.contact-list, +.social-media-list { + list-style: none; + margin-left: 0; +} + +.footer-col-wrapper { + font-size: 15px; + color: $grey-color; + margin-left: -$spacing-unit / 2; + @extend %clearfix; +} + +.footer-col { + float: left; + margin-bottom: $spacing-unit / 2; + padding-left: $spacing-unit / 2; +} + +.footer-col-1 { + width: -webkit-calc(35% - (#{$spacing-unit} / 2)); + width: calc(35% - (#{$spacing-unit} / 2)); +} + +.footer-col-2 { + width: -webkit-calc(20% - (#{$spacing-unit} / 2)); + width: calc(20% - (#{$spacing-unit} / 2)); +} + +.footer-col-3 { + width: -webkit-calc(45% - (#{$spacing-unit} / 2)); + width: calc(45% - (#{$spacing-unit} / 2)); +} + +@include media-query($on-laptop) { + .footer-col-1, + .footer-col-2 { + width: -webkit-calc(50% - (#{$spacing-unit} / 2)); + width: calc(50% - (#{$spacing-unit} / 2)); + } + + .footer-col-3 { + width: -webkit-calc(100% - (#{$spacing-unit} / 2)); + width: calc(100% - (#{$spacing-unit} / 2)); + } +} + +@include media-query($on-palm) { + .footer-col { + float: none; + width: -webkit-calc(100% - (#{$spacing-unit} / 2)); + width: calc(100% - (#{$spacing-unit} / 2)); + } +} + + + +/** + * Page content + */ +.page-content { + padding: $spacing-unit 0; +} + +.page-heading { + font-size: 20px; +} + +.post-list { + margin-left: 0; + list-style: none; + + > li { + margin-bottom: $spacing-unit; + } +} + +.post-meta { + font-size: $small-font-size; + color: $grey-color; +} + +.post-link { + display: block; + font-size: 24px; +} + + + +/** + * Posts + */ +.post-header { + margin-bottom: $spacing-unit; +} + +.post-title { + font-size: 42px; + letter-spacing: -1px; + line-height: 1; + + @include media-query($on-laptop) { + font-size: 36px; + } +} + +.post-content { + margin-bottom: $spacing-unit; + + h2 { + font-size: 32px; + + @include media-query($on-laptop) { + font-size: 28px; + } + } + + h3 { + font-size: 26px; + + @include media-query($on-laptop) { + font-size: 22px; + } + } + + h4 { + font-size: 20px; + + @include media-query($on-laptop) { + font-size: 18px; + } + } +} diff --git a/website/_sass/_syntax-highlighting.scss b/website/_sass/_syntax-highlighting.scss new file mode 100644 index 0000000..8fac597 --- /dev/null +++ b/website/_sass/_syntax-highlighting.scss @@ -0,0 +1,71 @@ +/** + * Syntax highlighting styles + */ +.highlight { + background: #fff; + @extend %vertical-rhythm; + + .highlighter-rouge & { + background: #eef; + } + + .c { color: #998; font-style: italic } // Comment + .err { color: #a61717; background-color: #e3d2d2 } // Error + .k { font-weight: bold } // Keyword + .o { font-weight: bold } // Operator + .cm { color: #998; font-style: italic } // Comment.Multiline + .cp { color: #999; font-weight: bold } // Comment.Preproc + .c1 { color: #998; font-style: italic } // Comment.Single + .cs { color: #999; font-weight: bold; font-style: italic } // Comment.Special + .gd { color: #000; background-color: #fdd } // Generic.Deleted + .gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific + .ge { font-style: italic } // Generic.Emph + .gr { color: #a00 } // Generic.Error + .gh { color: #999 } // Generic.Heading + .gi { color: #000; background-color: #dfd } // Generic.Inserted + .gi .x { color: #000; background-color: #afa } // Generic.Inserted.Specific + .go { color: #888 } // Generic.Output + .gp { color: #555 } // Generic.Prompt + .gs { font-weight: bold } // Generic.Strong + .gu { color: #aaa } // Generic.Subheading + .gt { color: #a00 } // Generic.Traceback + .kc { font-weight: bold } // Keyword.Constant + .kd { font-weight: bold } // Keyword.Declaration + .kp { font-weight: bold } // Keyword.Pseudo + .kr { font-weight: bold } // Keyword.Reserved + .kt { color: #458; font-weight: bold } // Keyword.Type + .m { color: #099 } // Literal.Number + .s { color: #d14 } // Literal.String + .na { color: #008080 } // Name.Attribute + .nb { color: #0086B3 } // Name.Builtin + .nc { color: #458; font-weight: bold } // Name.Class + .no { color: #008080 } // Name.Constant + .ni { color: #800080 } // Name.Entity + .ne { color: #900; font-weight: bold } // Name.Exception + .nf { color: #900; font-weight: bold } // Name.Function + .nn { color: #555 } // Name.Namespace + .nt { color: #000080 } // Name.Tag + .nv { color: #008080 } // Name.Variable + .ow { font-weight: bold } // Operator.Word + .w { color: #bbb } // Text.Whitespace + .mf { color: #099 } // Literal.Number.Float + .mh { color: #099 } // Literal.Number.Hex + .mi { color: #099 } // Literal.Number.Integer + .mo { color: #099 } // Literal.Number.Oct + .sb { color: #d14 } // Literal.String.Backtick + .sc { color: #d14 } // Literal.String.Char + .sd { color: #d14 } // Literal.String.Doc + .s2 { color: #d14 } // Literal.String.Double + .se { color: #d14 } // Literal.String.Escape + .sh { color: #d14 } // Literal.String.Heredoc + .si { color: #d14 } // Literal.String.Interpol + .sx { color: #d14 } // Literal.String.Other + .sr { color: #009926 } // Literal.String.Regex + .s1 { color: #d14 } // Literal.String.Single + .ss { color: #990073 } // Literal.String.Symbol + .bp { color: #999 } // Name.Builtin.Pseudo + .vc { color: #008080 } // Name.Variable.Class + .vg { color: #008080 } // Name.Variable.Global + .vi { color: #008080 } // Name.Variable.Instance + .il { color: #099 } // Literal.Number.Integer.Long +} diff --git a/website/about.adoc b/website/about.adoc new file mode 100644 index 0000000..8ed64cf --- /dev/null +++ b/website/about.adoc @@ -0,0 +1,12 @@ +--- +layout: page +title: About +permalink: /about/ +weight: 4 +--- + +MrWriter is written by Thomas Leitz (http://github.com/unruhschuh[@unruhschuh]) and licensed under the GNU General Public License 3.0. MrWriter is written in C++/Qt and runs on Linux, Windows and Mac OS X. + + + + diff --git a/website/css/main.scss b/website/css/main.scss new file mode 100644 index 0000000..f2e566e --- /dev/null +++ b/website/css/main.scss @@ -0,0 +1,53 @@ +--- +# Only the main Sass file needs front matter (the dashes are enough) +--- +@charset "utf-8"; + + + +// Our variables +$base-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +$base-font-size: 16px; +$base-font-weight: 400; +$small-font-size: $base-font-size * 0.875; +$base-line-height: 1.5; + +$spacing-unit: 30px; + +$text-color: #111; +$background-color: #fdfdfd; +$brand-color: #2a7ae2; + +$grey-color: #828282; +$grey-color-light: lighten($grey-color, 40%); +$grey-color-dark: darken($grey-color, 25%); + +// Width of the content area +$content-width: 800px; + +$on-palm: 600px; +$on-laptop: 800px; + + + +// Use media queries like this: +// @include media-query($on-palm) { +// .wrapper { +// padding-right: $spacing-unit / 2; +// padding-left: $spacing-unit / 2; +// } +// } +@mixin media-query($device) { + @media screen and (max-width: $device) { + @content; + } +} + + + +// Import partials from `sass_dir` (defaults to `_sass`) +@import + "base", + "layout", + "syntax-highlighting" +; diff --git a/website/downloads.adoc b/website/downloads.adoc new file mode 100644 index 0000000..be00650 --- /dev/null +++ b/website/downloads.adoc @@ -0,0 +1,27 @@ +--- +layout: page +title: Downloads +permalink: /downloads/ +weight: 1 +--- + +## Download MrWriter + +|=== +| Platform | Download + +| Linux +| https://github.com/unruhschuh/MrWriter/releases/download/v0.0.2/MrWriter-0.0.2_Linux.tar.gz[MrWriter-0.0.2_Linux.tar.gz] + +| Linux (AppImage) +| https://github.com/unruhschuh/MrWriter/releases/download/v0.0.2/MrWriter-0.0.2.AppImage[MrWriter-0.0.2.AppImage] + +| Mac OS X +| https://github.com/unruhschuh/MrWriter/releases/download/v0.0.2/MrWriter-0.0.2_Mac.dmg[MrWriter-0.0.2_Mac.dmg] + +| Windows +| https://github.com/unruhschuh/MrWriter/releases/download/v0.0.2/MrWriter-0.0.2_Win.zip[MrWriter-0.0.2_Win.zip] +|=== + +Older versions and the source code can be downloaded https://github.com/unruhschuh/MrWriter/releases[here]. + diff --git a/website/feed.xml b/website/feed.xml new file mode 100644 index 0000000..a6628bd --- /dev/null +++ b/website/feed.xml @@ -0,0 +1,30 @@ +--- +layout: null +--- + + + + {{ site.title | xml_escape }} + {{ site.description | xml_escape }} + {{ site.url }}{{ site.baseurl }}/ + + {{ site.time | date_to_rfc822 }} + {{ site.time | date_to_rfc822 }} + Jekyll v{{ jekyll.version }} + {% for post in site.posts limit:10 %} + + {{ post.title | xml_escape }} + {{ post.content | xml_escape }} + {{ post.date | date_to_rfc822 }} + {{ post.url | prepend: site.baseurl | prepend: site.url }} + {{ post.url | prepend: site.baseurl | prepend: site.url }} + {% for tag in post.tags %} + {{ tag | xml_escape }} + {% endfor %} + {% for cat in post.categories %} + {{ cat | xml_escape }} + {% endfor %} + + {% endfor %} + + diff --git a/website/images/Icon1024.png b/website/images/Icon1024.png new file mode 100644 index 0000000..37f44ef Binary files /dev/null and b/website/images/Icon1024.png differ diff --git a/website/images/MrWriterIcon.pdf b/website/images/MrWriterIcon.pdf new file mode 100644 index 0000000..9a7a5a9 Binary files /dev/null and b/website/images/MrWriterIcon.pdf differ diff --git a/website/images/MrWriterIcon.svg b/website/images/MrWriterIcon.svg new file mode 100644 index 0000000..f0793b5 --- /dev/null +++ b/website/images/MrWriterIcon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/website/images/MrWriterLin.png b/website/images/MrWriterLin.png new file mode 100644 index 0000000..30867f4 Binary files /dev/null and b/website/images/MrWriterLin.png differ diff --git a/website/images/MrWriterMac.png b/website/images/MrWriterMac.png new file mode 100644 index 0000000..5750021 Binary files /dev/null and b/website/images/MrWriterMac.png differ diff --git a/website/images/MrWriterWin.png b/website/images/MrWriterWin.png new file mode 100644 index 0000000..554cab4 Binary files /dev/null and b/website/images/MrWriterWin.png differ diff --git a/website/images/blackIcon.png b/website/images/blackIcon.png new file mode 100644 index 0000000..82444a1 Binary files /dev/null and b/website/images/blackIcon.png differ diff --git a/website/images/blueIcon.png b/website/images/blueIcon.png new file mode 100644 index 0000000..d60f9cc Binary files /dev/null and b/website/images/blueIcon.png differ diff --git a/website/images/circleIcon.png b/website/images/circleIcon.png new file mode 100644 index 0000000..cc63662 Binary files /dev/null and b/website/images/circleIcon.png differ diff --git a/website/images/copyIcon.png b/website/images/copyIcon.png new file mode 100644 index 0000000..9268f7b Binary files /dev/null and b/website/images/copyIcon.png differ diff --git a/website/images/cutIcon.png b/website/images/cutIcon.png new file mode 100644 index 0000000..3ee0e56 Binary files /dev/null and b/website/images/cutIcon.png differ diff --git a/website/images/dashDotPatternIcon.png b/website/images/dashDotPatternIcon.png new file mode 100644 index 0000000..0263851 Binary files /dev/null and b/website/images/dashDotPatternIcon.png differ diff --git a/website/images/dashPatternIcon.png b/website/images/dashPatternIcon.png new file mode 100644 index 0000000..1a06f69 Binary files /dev/null and b/website/images/dashPatternIcon.png differ diff --git a/website/images/dotPatternIcon.png b/website/images/dotPatternIcon.png new file mode 100644 index 0000000..62d67a2 Binary files /dev/null and b/website/images/dotPatternIcon.png differ diff --git a/website/images/eraserIcon.png b/website/images/eraserIcon.png new file mode 100644 index 0000000..1b0774d Binary files /dev/null and b/website/images/eraserIcon.png differ diff --git a/website/images/finePenWidthIcon.png b/website/images/finePenWidthIcon.png new file mode 100644 index 0000000..6b8d83b Binary files /dev/null and b/website/images/finePenWidthIcon.png differ diff --git a/website/images/fullscreenIcon.png b/website/images/fullscreenIcon.png new file mode 100644 index 0000000..09b0733 Binary files /dev/null and b/website/images/fullscreenIcon.png differ diff --git a/website/images/grayIcon.png b/website/images/grayIcon.png new file mode 100644 index 0000000..a3e18fc Binary files /dev/null and b/website/images/grayIcon.png differ diff --git a/website/images/greenIcon.png b/website/images/greenIcon.png new file mode 100644 index 0000000..4be9528 Binary files /dev/null and b/website/images/greenIcon.png differ diff --git a/website/images/handIcon.png b/website/images/handIcon.png new file mode 100644 index 0000000..d12a06a Binary files /dev/null and b/website/images/handIcon.png differ diff --git a/website/images/lightblueIcon.png b/website/images/lightblueIcon.png new file mode 100644 index 0000000..acde154 Binary files /dev/null and b/website/images/lightblueIcon.png differ diff --git a/website/images/lightgreenIcon.png b/website/images/lightgreenIcon.png new file mode 100644 index 0000000..69ee613 Binary files /dev/null and b/website/images/lightgreenIcon.png differ diff --git a/website/images/magentaIcon.png b/website/images/magentaIcon.png new file mode 100644 index 0000000..069f23d Binary files /dev/null and b/website/images/magentaIcon.png differ diff --git a/website/images/mediumPenWidthIcon.png b/website/images/mediumPenWidthIcon.png new file mode 100644 index 0000000..3807109 Binary files /dev/null and b/website/images/mediumPenWidthIcon.png differ diff --git a/website/images/newIcon.png b/website/images/newIcon.png new file mode 100644 index 0000000..ff63a9a Binary files /dev/null and b/website/images/newIcon.png differ diff --git a/website/images/openIcon.png b/website/images/openIcon.png new file mode 100644 index 0000000..f55742c Binary files /dev/null and b/website/images/openIcon.png differ diff --git a/website/images/orangeIcon.png b/website/images/orangeIcon.png new file mode 100644 index 0000000..64ce50f Binary files /dev/null and b/website/images/orangeIcon.png differ diff --git a/website/images/pageDownIcon.png b/website/images/pageDownIcon.png new file mode 100644 index 0000000..a0ff1c3 Binary files /dev/null and b/website/images/pageDownIcon.png differ diff --git a/website/images/pageDownPlusIcon.png b/website/images/pageDownPlusIcon.png new file mode 100644 index 0000000..a6ec23e Binary files /dev/null and b/website/images/pageDownPlusIcon.png differ diff --git a/website/images/pageFirstIcon.png b/website/images/pageFirstIcon.png new file mode 100644 index 0000000..a218e5f Binary files /dev/null and b/website/images/pageFirstIcon.png differ diff --git a/website/images/pageLastIcon.png b/website/images/pageLastIcon.png new file mode 100644 index 0000000..d5faa4c Binary files /dev/null and b/website/images/pageLastIcon.png differ diff --git a/website/images/pageUpIcon.png b/website/images/pageUpIcon.png new file mode 100644 index 0000000..19c98da Binary files /dev/null and b/website/images/pageUpIcon.png differ diff --git a/website/images/pasteIcon.png b/website/images/pasteIcon.png new file mode 100644 index 0000000..1fd5798 Binary files /dev/null and b/website/images/pasteIcon.png differ diff --git a/website/images/penIcon.png b/website/images/penIcon.png new file mode 100644 index 0000000..e109df1 Binary files /dev/null and b/website/images/penIcon.png differ diff --git a/website/images/redIcon.png b/website/images/redIcon.png new file mode 100644 index 0000000..c5bd7aa Binary files /dev/null and b/website/images/redIcon.png differ diff --git a/website/images/redoIcon.png b/website/images/redoIcon.png new file mode 100644 index 0000000..9db0411 Binary files /dev/null and b/website/images/redoIcon.png differ diff --git a/website/images/rulerIcon.png b/website/images/rulerIcon.png new file mode 100644 index 0000000..9a5d450 Binary files /dev/null and b/website/images/rulerIcon.png differ diff --git a/website/images/saveIcon.png b/website/images/saveIcon.png new file mode 100644 index 0000000..24fb7cf Binary files /dev/null and b/website/images/saveIcon.png differ diff --git a/website/images/savePDFIcon.png b/website/images/savePDFIcon.png new file mode 100644 index 0000000..0161571 Binary files /dev/null and b/website/images/savePDFIcon.png differ diff --git a/website/images/selectIcon.png b/website/images/selectIcon.png new file mode 100644 index 0000000..5fddecf Binary files /dev/null and b/website/images/selectIcon.png differ diff --git a/website/images/solidPatternIcon.png b/website/images/solidPatternIcon.png new file mode 100644 index 0000000..c4da425 Binary files /dev/null and b/website/images/solidPatternIcon.png differ diff --git a/website/images/thickPenWidthIcon.png b/website/images/thickPenWidthIcon.png new file mode 100644 index 0000000..453a8b6 Binary files /dev/null and b/website/images/thickPenWidthIcon.png differ diff --git a/website/images/undoIcon.png b/website/images/undoIcon.png new file mode 100644 index 0000000..ad13486 Binary files /dev/null and b/website/images/undoIcon.png differ diff --git a/website/images/veryFinePenWidthIcon.png b/website/images/veryFinePenWidthIcon.png new file mode 100644 index 0000000..711dc1f Binary files /dev/null and b/website/images/veryFinePenWidthIcon.png differ diff --git a/website/images/veryThickPenWidthIcon.png b/website/images/veryThickPenWidthIcon.png new file mode 100644 index 0000000..80bb886 Binary files /dev/null and b/website/images/veryThickPenWidthIcon.png differ diff --git a/website/images/whiteIcon.png b/website/images/whiteIcon.png new file mode 100644 index 0000000..00554ee Binary files /dev/null and b/website/images/whiteIcon.png differ diff --git a/website/images/yellowIcon.png b/website/images/yellowIcon.png new file mode 100644 index 0000000..f700554 Binary files /dev/null and b/website/images/yellowIcon.png differ diff --git a/website/images/zoomFitHeightIcon.png b/website/images/zoomFitHeightIcon.png new file mode 100644 index 0000000..2eb41cc Binary files /dev/null and b/website/images/zoomFitHeightIcon.png differ diff --git a/website/images/zoomFitWidthIcon.png b/website/images/zoomFitWidthIcon.png new file mode 100644 index 0000000..1de5301 Binary files /dev/null and b/website/images/zoomFitWidthIcon.png differ diff --git a/website/images/zoomInIcon.png b/website/images/zoomInIcon.png new file mode 100644 index 0000000..51abb50 Binary files /dev/null and b/website/images/zoomInIcon.png differ diff --git a/website/images/zoomOutIcon.png b/website/images/zoomOutIcon.png new file mode 100644 index 0000000..84dc2a5 Binary files /dev/null and b/website/images/zoomOutIcon.png differ diff --git a/website/index.adoc b/website/index.adoc new file mode 100644 index 0000000..b6c6b82 --- /dev/null +++ b/website/index.adoc @@ -0,0 +1,14 @@ +--- +layout: page +title: Home +permalink: / +weight: 0 +--- + +== Welcome to MrWriter + +image::/images/MrWriterIcon.svg[float="right",align="center"] +MrWriter is an application aiming to replace both pen and paper for handwritten note taking, as well as blackboards for giving lectures in front of students. It is highly inspired by Xournal / Xournal++ but the focus is more on taking notes and platform independence, rather than PDF annotation. Xournal files (.xoj) can be imported, but only strokes get recognized. + + + diff --git a/website/other/MrWriterDoc.html b/website/other/MrWriterDoc.html new file mode 100644 index 0000000..893da19 --- /dev/null +++ b/website/other/MrWriterDoc.html @@ -0,0 +1,608 @@ + + + + + + + +MrWriter + + + + + +
+
+
+
+

MrWriter is a programm aimed at replacing pen and paper for note taking as well as blackboards in schools and universities. +You can find the newest version at MrWriter

+
+
+
+
Table of Contents
+ +
+
+
+

Users Guide

+
+
+

Tools

+ + +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 1. Tools
IconNameFunction

penIcon

Pen

Draw freehand lines. If you use a Wacom style pen, lines change their width with respect to pressure.

rulerIcon

Ruler

Draw straight lines.

circleIcon

Circle

Draw circles starting at the center and defining the radius.

eraserIcon

Eraser

Erase strokes. Hold the Shift key to erase freely.

selectIcon

Select

Select strokes. If selected, strokes can be moved, copied, cut, and rotated.

handIcon

Hand

Move the document around.

+
+
+
+
+

Keyboard shortcuts

+
+
+

MrWriter makes excessive use of keyboard shortcuts. The table Shortcuts shows a complete list of all shortcuts.

+
+ + ++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Table 2. Shortcuts
ActionShortcut

Choose Pen

1

Choose Ruler

2

Choose Circle

3

Choose Eraser

4

Choose Select

5

Choose Hand

6

Erase freely

hold Shift while using the Eraser Tool

Save File

Ctrl / Cmd+s on Windows and Linux

Black

Q

Red

W

Green

E

Blue

R

Toggle Toolbar

T

Toggle Fullscreen

F

Toggle Statusbar

S

Pen Width

Ctrl/Cmd+1 through 5

+
+
+
+ + + + + \ No newline at end of file diff --git a/website/screenshots.md b/website/screenshots.md new file mode 100644 index 0000000..a2f8ecf --- /dev/null +++ b/website/screenshots.md @@ -0,0 +1,16 @@ +--- +layout: page +title: Screenshots +permalink: /screenshots/ +weight: 2 +--- + +#### Linux +![Linux](/images/MrWriterLin.png) + +#### Windows +![Linux](/images/MrWriterWin.png) + +#### Mac OS X +![Linux](/images/MrWriterMac.png) + diff --git a/widget.cpp b/widget.cpp index fc76d6f..378b000 100644 --- a/widget.cpp +++ b/widget.cpp @@ -1220,8 +1220,6 @@ void Widget::continueResizingSelection(QPointF mousePos) qreal sx = 0.0; qreal sy = 0.0; - qreal angle = 0.0; - qreal moveBackX = 0.0; qreal moveBackY = 0.0;