dashed arrows not dashed in canvasdraw

Accueil Forums Programmation WIMS Programmation d’exercices OEF dashed arrows not dashed in canvasdraw

Vous lisez 4 fils de discussion
  • Auteur
    Messages
    • #6235
      byache
      Participant
      Up
      0
      Down

      Hello,
      I think there is a miscellaneous with the « dashed » keyword in canvasdraw : in the example bellow, the green arrow appears not dashed.

      \text{sol=wims(exec canvasdraw
        size 750,450
        xrange -15,15
        yrange -9,9
        opacity 155,155
        linewidth 1
        grid 1,1,grey
        opacity 255,255
        linewidth 2
        fontfamily 18px Arial
        dashtype 2,2
        darrow -5,2,3,5,10,blue
        arrow -5,6,1,2,10,red
        darrow 5,4,7,3,10,green
        )}
      \statement{\sol}

      The doc recommands to write

      dashed
      arrow ...

      but the result is the same.

      If I change the color, same problem but if I change any coordinates, I strangely may obtain the dashed…

    • #6236
      bernadette
      Maître des clés
      Up
      0
      Down

      Si on met
      dashtype 2,5
      ou
      dashtype 2,1
      au lieu de
      dashtype 2,2

      il me semble que cela fonctionne! je ne dis pas cela pour que tu le fasse, mais cela peut être aider pour le débogage si bogue il y a ?

      Bernadette

    • #6237
      jm.evers
      Participant
      Up
      0
      Down

      Hi,

      This is clearly a bug in canvasdraw arrow(s)
      I will have to look into this…and see if there are any other mis behaviours with dashing,,,
      (other primitives like lines,hlines,segments etc do not show this error)

      size 400,400
      xrange -10,10
      yrange -10,10
      linewidth 2
      dashtype 4,2
      dsegment 0,0,5,5,red
      dsegment 0,0,-5,5,blue
      dsegment 0,0,5,-5,green
      dsegment 0,0,-5,-5,orange
      dashtype 2,6
      dhline 0,-5,red
      dhline 0,-4,blue
      dhline 0,-3,green
      dhline 0,-2,orange
      dvline -5,0,red
      dvline -4,0,blue
      dvline -3,0,green
      dvline -2,0,orange
      

      joke

      • Cette réponse a été modifiée le il y a 1 semaine et 4 jours par jm.evers.
    • #6246
      jm.evers
      Participant
      Up
      0
      Down

      Hi,
      helas this is not a bug of canvasdraw, but it seems that the html5 canvas implementation of dashing is somewhat troublesome.
      The dashing may even be different on different browsers
      For now there is no -easy- way to correct this in canvasdraw.

      joke

    • #6264
      jm.evers
      Participant
      Up
      0
      Down

      Uploaded to SVN a slightly improved version of canvasdraw

      • dashing will still depend on angle of the object (html5 canvas ‘flaw’)
      • dashing will still depend on individual browser
      • corrected dashing in userdraw,multidraw
      • corrected arrow head (it was dashed…)

      Thank you for noticing !
      (and please keep kicking it to find flaws and bugs !)

      joke

Vous lisez 4 fils de discussion
  • Vous devez être connecté pour répondre à ce sujet.