Menu

Drawj2d releases 1.2.x

2021-01-09
2021-04-16
1 2 > >> (Page 1 of 2)
  • A. Vontobel

    A. Vontobel - 2021-01-09

    Please use this forum topic for comments about these releases.

     
  • Anonymous

    Anonymous - 2021-01-20

    Please move to github or gitlab. I am trying to package your app to NixOS and I spend last hour trying to download the zip (programmatically) from SourceForge, so far unsuccessfully.

     
    • A. Vontobel

      A. Vontobel - 2021-03-14

      Does this work?
      wget https://downloads.sourceforge.net/project/drawj2d/1.2.2/Drawj2d-1.2.2.zip

       
  • Anonymous

    Anonymous - 2021-02-24

    I found an issue with hatchpolygon, where the hatching isn't complete.
    For a small example that shows the problem, see attachments.

     
    • A. Vontobel

      A. Vontobel - 2021-03-14

      Thanks for reporting. I will have to look closely to see what is causing the issue.
      The work-around is (you already use it in your example) :
      Use hatch 45.001 2 (instead of hatch 45 2).

       
      • A. Vontobel

        A. Vontobel - 2021-03-14

        The origin of the issue is numerical precision. E.g. -8.9e-17 is not >= 0.0. Thus the intersection point of the (missing) hatch line is considered not to intersect the polygon section. Setting a tolerance for 0 (and 1) could solve the problem, but testing would be required to see whether the causes other issues ...

         
    • A. Vontobel

      A. Vontobel - 2021-03-14

      I have committed a fix r298 for the issue. It will be included in the next release (probably 1.2.3) if it won't cause any new issues.

       
      👍
      1

      Last edit: A. Vontobel 2021-03-14
      • A. Vontobel

        A. Vontobel - 2021-03-21

        Drawj2d 1.2.3 released.

         
  • Stefan Blixten Karlsson

    I noticed that some quotation marks and Swedish letters are NOT "simple" lines in the Lines font, see attached image and hcl-file. I do hope that you can fix this.
    (BTW the image is from the reMarkable)

     
    • A. Vontobel

      A. Vontobel - 2021-03-14

      It certainly is possible to fix this.
      The lines fonts (plain and italic) are based on the publicly available "Hershey fonts". They cover English (Hershey fonts "rowmans" and "cursive"), Greek (Hershey font "greeks") and Russian letters and some symbols. They do not cover the Unicode groups Latin-1 or Latin-A. I have extended the glyph coverage for French, German, Italian (Latin-1), Latvian and Polish (Latin-A) languages. See the attached pdf files for Lines plain and Lines italic (implementation in the link).

      Your example contains glyphs that are not implemented. What happens in such a case:
      - fall back to "Lines plain" in case of "Lines italic"
      - fall back to the last used Truetype font

      I have implemented the line font because the reMarkable tablet does not support fills in the file format it uses for the notebooks. Thus only the outlines of Truetype fonts are rendered. The option was to mimic fills by close hatch lines, but this would result in a large file size. I have chosen to go the single line font way instead, but I have only implemented glyphs of languages I have to do with.
      I am pleased there are a few other people using drawj2d to generate reMarkable notebook pages. It would be nice to extend the font coverage to more European languages and a few more mathematical symbols.
      I will most likely have to limit my effort to the Latin-1 group. The Swedish letters of your example are not a big deal to implement (a circle above an existing glyph). For other "extended latin" glyphs or symbols I will be happy to accept contributions . If anybody is interested to do so, while it might be time consuming, it is not complicated (implementation linked above). There is a hcl-file that helps creating new glyphs.

       
  • Stefan Blixten Karlsson

    How about these for the missing Swedish letters (åÅ)

     
  • Stefan Blixten Karlsson

    ..and here are the missing Swedish letters (åÅ) in italic.

     
    • Anonymous

      Anonymous - 2021-03-15

      Thanks for your contribution! I'll include it.
      Maybe I'll use 12 polygon segments instead of 6 for the ring (same position and diameter).
      Are there more missing letters for Swedish?

       

      Last edit: A. Vontobel 2021-03-16
      • Stefan Blixten Karlsson

        That looks great!
        That will make all Swedish letters available!
        Thanks, and keep up the good work!

         
        • Anonymous

          Anonymous - 2021-03-17

          I have commited the new glyphs to the subversion code repository. To compile it you'll need javac, svn and ant. Or wait for the next release.

           
          👍
          1

          Last edit: A. Vontobel 2021-03-17
          • A. Vontobel

            A. Vontobel - 2021-03-21

            Drawj2d 1.2.3 released. The Lines font now covers all the letters of the latin-1 group (a few symbols are not implemented though).

             
            👍
            1
  • Stefan Blixten Karlsson

    Found a bug :-(

    When using SVG-file even single path lines are draw as double lines when send to the reMarkable2 via rmapi. As I understand it the reMarkables notebook format can't handle filled areas, only lines, but with different widths.

    See attach files, that will show the problem.

    BTW, it only shows up incorrect when using "--type rmapi", it seems correct on other output types (I tried png, pdf and screen).

    I'm using drawj2d v1.23.

     

    Last edit: Stefan Blixten Karlsson 2021-03-30
    • A. Vontobel

      A. Vontobel - 2021-03-30

      Let's call it a limitation :)

      As I understand it the reMarkables notebook format can't handle filled areas, only lines, but with different widths.

      Correct.
      - The output types pdf, svg, eps, png, screen, emf, tikz and hcl support "fills".
      - The output types bgd and rm|rmapi do not. A special case is dxf, as the file format supports fills (solid), but drawj2d has not implemented it.

      Now, the best would be if reMarkable enhanced the file format. Support for the "fill" operation would also allow to properly render truetype fonts (outline glyphs).

      Drawj2d (RemarkableGraphics2D.java) could implement an algorithm that fills polygons with lines. An approach would be to use and extend the existing hatch function. I'd expect rather bad results regarding the rendering of the line ends - or if choosing thin lines, the file size getting large. The device gets stuck when you try to select an area with many lines (this is the problem with raster images, e.g. image scan.png).
      A better approach might be to draw parallel lines (polygons) at the inside of a polygon. But someone has to write the algorithm ... Not sure how difficult it would be to get it right for general cases (e.g. intersections, holes).

      When using SVG-file even single path lines are draw as double lines ...

      This seems to be the way svg are interpreted by the library svgSalamander. This probably could be changed (taking care not to break other output types), but someone would have to dig in that code.

      To be honest, for me the double lines are not an issue I could spend much time on. But if anybody wants to tackle it I'll be open to accept contributions.

      Thanks for reporting, regards

       
    • A. Vontobel

      A. Vontobel - 2021-04-10

      I have commited an (experimental) implementation to the subversion code repository. For reMarkable output (-T rm, -Trmapi, also -Tbgd) the command image drawing.svg will draw single lines with associated line widths instead of outlines.
      Feel free to test it and report if it works for you. To compile you'll need javac and ant: just type ant in the main directory (where build.xml is).

       
      • Stefan Blixten Karlsson

        Tried to build it, but got "BUILD FAILED" !
        See console output below:

        C:\Users\Stefan\Documents\reMarkable\Drawj2d\code\trunk

        svn info
        Path: .
        Working Copy Root Path: C:\Users\Stefan\Documents\reMarkable\Drawj2d\code
        URL: https://svn.code.sf.net/p/drawj2d/code/trunk
        Relative URL: ^/trunk
        Repository Root: https://svn.code.sf.net/p/drawj2d/code
        Repository UUID: 71f7b201-d04d-4194-9269-977e268ebef5
        Revision: 310
        Node Kind: directory
        Schedule: normal
        Last Changed Author: qwert2003
        Last Changed Rev: 310
        Last Changed Date: 2021-04-10 16:57:00 +0200 (lör, 10 apr 2021)

        C:\Users\Stefan\Documents\reMarkable\Drawj2d\code\trunk

        javac --version
        javac 16

        C:\Users\Stefan\Documents\reMarkable\Drawj2d\code\trunk

        ant -version
        Apache Ant(TM) version 1.10.9 compiled on September 27 2020

        C:\Users\Stefan\Documents\reMarkable\Drawj2d\code\trunk

        ant
        Buildfile: C:\Users\Stefan\Documents\reMarkable\Drawj2d\code\trunk\build.xml

        init:
        [mkdir] Created dir:
        C:\Users\Stefan\Documents\reMarkable\Drawj2d\code\trunk\build

        compile:
        [javac] Compiling 1247 source files to
        C:\Users\Stefan\Documents\reMarkable\Drawj2d\code\trunk\build
        [javac]
        C:\Users\Stefan\Documents\reMarkable\Drawj2d\code\trunk\src\org\hecl\Interp.java:665:
        error: invalid use of a restricted identifier 'yield'
        [javac] yield(); // give other thread a
        chance
        [javac] ^
        [javac] (to invoke a method called yield, qualify the yield with a
        receiver or type name)
        [javac] 1 error

        BUILD FAILED
        C:\Users\Stefan\Documents\reMarkable\Drawj2d\code\trunk\build.xml:30:
        Compile failed; see the compiler error output for details.

        Total time: 4 seconds

        C:\Users\Stefan\Documents\reMarkable\Drawj2d\code\trunk

        Den lör 10 apr. 2021 kl 17:08 skrev A. Vontobel qwert2003@users.sourceforge.net:

        I have commited an (experimental) implementation to the subversion code
        repository. For reMarkable output (-T rm, -Trmapi, also -Tbgd) the command image
        drawing.svg will draw single lines with associated line widths instead of
        outlines.
        Feel free to test it and report if it works for you. To compile you'll
        need javac and ant: just type ant in the main directory (where build.xml
        is).


        Drawj2d releases 1.2.x
        https://sourceforge.net/p/drawj2d/discussion/general/thread/ca235cc8a3/?limit=25&page=1#196b/61a0


        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/drawj2d/discussion/general/

        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/subscriptions/

         
        • A. Vontobel

          A. Vontobel - 2021-04-10

          Ok, it seems the code has compatibility issues with Java 16. I currently use Java 11 - and Java 8 for the downloadable binaries (zip/rpm).
          Please try if it compiles and runs when adding the line to build.xml:
          <compilerarg value="-J--illegal-access=permit"/>
          between the lines
          <!--<compilerarg value="-Xlint"/>-->
          </javac>

          Background: The Java 16 release notes mention Strongly Encapsulate JDK Internals by Default. Not sure whether the option --illegal-access=permit also must be added to java when running the program.

          If it does not work as described above, please use Java 11 to build the program. And tell me if it then runs with Java 16 (or Java 11 only).

          Thanks for your feedback.

           
  • Stefan Blixten Karlsson

    ...yes, limitation is a better name...

    ...but in this case there should NOT be any "fill", it should only be a lines a round the perimeter.
    So, why is it then a double line ?

     
1 2 > >> (Page 1 of 2)

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.