Menu

Drawj2d 1.3.4 released

This is a release for reMarkable Paper Pro users. The reMarkable notebooks support colours.

Changes:
- rm output colours: black, grey or white, blue/inkblue, red/inkred. New: green, yellow, cyan, magenta and (highlighter colours) pink, lightgray, lightgreen and lightyellow. Drawj2d will map darkgray to black, darkgreen to green, orange to yellow, darkorange to red, brown to gray, violet and purple to magenta and any other colour to black, grey or white depending on the brightness.
- rm output: image scan.png will use the current pen colour
- new command doubleline

Posted by A. Vontobel 2024-09-29
  • A. Vontobel

    A. Vontobel - 2024-09-30
    Announcement on Reddit

    Geometric shapes in rM notebooks - Drawj2d updated to support reMarkable Pro colours

    Drawj2d is a tool to create technical line drawings in vector format (pdf, svg, ...). It can also write reMarkable notebook pages (rmdoc / rmn / rm). These notebooks are editable on the tablet, thus select/copy/paste works.
    The command line program reads a text file that describes the drawing. The input language consists of commands such as line or label. Coordinates are given in natural units, e.g. [mm].

    Version 1.3.4 is an update for reMarkable Paper Pro users. It brings colour support to the reMarkable notebooks.

    The following colours are recognized
    - black, grey or white
    - blue
    - red
    - green
    - yellow
    - cyan
    - magenta
    - pink (highlighter colour)
    - lightgray (highlighter colour)
    - lightgreen (highlighter colour)
    - lightyellow (highlighter colour)

    Drawj2d will map the following colours to the available ones
    - inkblue to blue
    - inkred to red
    - darkgray to black
    - darkgreen to green
    - orange to yellow (rmPro has a orange highlighter, but I do not know how to write that colour)
    - darkorange to red
    - brown to gray
    - violet and purple to magenta
    - any other colour to black, grey or white depending on the brightness

    The rmPro has as slightly higher resolution than the rm2. If you want to get the drawing to scale you can tell drawj2d the resolution using the -r parameter:
    drawj2d -Trmdoc -r229 drawing.hcl

    For those interested only in coversion of pdf / svg / png to rM notebook there is a caveat:
    - png are approximated with parallel monochrome lines. The current pen colour will be used (since 1.3.4):
    echo pen red; image diagram.png | drawj2d -Trmdoc
    - raster images embedded in svg work the same way as png. Raster images in pdf do not use the pen colour.
    - pdf/svg colours are only applied if they match exactly the supported colour definition. Thus red (0xff0000) will result in red, but any close colour (e.g. 0xff2800) will turn in black/gray or white. So the notebook will be black/gray without colours in many cases.

    To upload the notebooks created by drawj2d you can use the reMarkable desktop app (drag and drop the rmdoc file) or the USB web interface. RCU support for reMarkable Paper Pro is expected coming soon.

     
    • Anonymous

      Anonymous - 2024-10-07

      The supported pen colours for notebooks with colours on the rMpro are listed above. In the hcl file you can use them like this:

      font Lines
      m 15 10
      pen blue
      text {Some text in blue.}
      pen red
      linerel 50 0; # a red line
      

      If you just convert a pdf (or svg) to a notebook using the following command on the command line:

      echo image my.pdf | drawj2d -Trmdoc
      

      then the colours are only applied if they match exactly the supported colour definition. Use the exact red-green-blue (rgb) values for the colours when you create the pdf/svg.

      Pen colours:
      • black, grey or white
      • blue 0000ff (hex representation) or r=0 g=0 b=255 (equivalent decimal representation)
      • red ff0000
      • green 00ff00
      • yellow ffff00
      • cyan 00ffff
      • magenta ff00ff

      The highlighter colours currently are (experimental)

      • pink ffafaf
        (echo 'Integer.toHexString(java.awt.Color.PINK.getRGB())' | jshell)
      • lightgreen a9fa5c (experimental, might change)
      • lightyellow fefd60 experimental, might change)

      Any different colour (even close ones) will turn in black/gray or white. If we want to change that behaviour we will need an formula that maps the rgb colour space to the available nine pen colours.

       

      Last edit: A. Vontobel 2024-10-07
    • A. Vontobel

      A. Vontobel - 2024-10-07

      The supported pen colours for notebooks with colours on the rMpro are listed above. In the hcl file you can use them like this:

      font Lines
      m 15 10
      pen blue
      text {Some text in blue.}
      pen red
      linerel 50 0; # a red line
      

      If you just convert a pdf (or svg) to a notebook using the following command on the command line:

      echo image my.pdf | drawj2d -Trmdoc
      

      then the colours are only applied if they match exactly the supported colour definition. Use the exact red-green-blue (rgb) values for the colours when you create the pdf/svg.

      Pen colours:
      • black, grey or white
      • blue 0000ff (hex representation) or r=0 g=0 b=255 (equivalent decimal representation)
      • red ff0000
      • green 00ff00
      • yellow ffff00
      • cyan 00ffff
      • magenta ff00ff

      The highlighter colours currently are (experimental)

      • pink ffafaf
        (echo 'Integer.toHexString(java.awt.Color.PINK.getRGB())' | jshell)
      • lightgreen a9fa5c (experimental, might change)
      • lightyellow fefd60 experimental, might change)

      Any different colour (even close ones) will turn in black/gray or white. If we want to change that behaviour we will need an formula that maps the rgb colour space to the available nine pen colours.

       
  • A. Vontobel

    A. Vontobel - 2024-10-02

    Forgot to mention in the release notes:
    --deprecate --type rmapi (will be removed)

    rMAPI supports
    - rm
    - rmdoc (since version 0.2.7)
    Thus the old output type (zip file with old style metadata) is not needed anymore.

    Due to a recent rM cloud API change you will need an up to date version of rmapi.

     

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.