Disegno di un rettangolo spesso

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #238813 quote
    Gabriele Battista
    Participant
    Senior

    E’ possibile disegnare un rettangolo con i lati di uno spessore da definire? grazie

    #238822 quote
    Iván González
    Moderator
    Master

    Sì.

    drawrectangle(x1,y1,x2,y2)style(line,3)

    Quello che non puoi fare è avere una variabile che definisca lo spessore.

    robertogozzi and Gabriele Battista thanked this post
    #238835 quote
    druby
    Participant
    New

    Potrebbe essere una buona soluzione basarsi su questo codice, a seconda di cosa si sta cercando di fare.

    defparam drawonlastbaronly = true
    
    thickness = 1
    size = 20
    
    // xy coordinates
    x1 = barindex[size]
    y1 = high[size]
    x2 = barindex
    y2 = low
    
    // fill color
    r = 255
    g = 0
    b = 255
    a = 0      // 0 = no fill
    
    // border color
    br = 255
    bg = 0
    bb = 255
    ba = 255     // 0 = no border
    
    
       if thickness = 1 then
    drawrectangle(x1,y1,x2,y2) style(line,1) coloured(r,g,b,a) borderColor(br,bg,bb,ba)
    elsif thickness = 2 then
    drawrectangle(x1,y1,x2,y2) style(line,2) coloured(r,g,b,a) borderColor(br,bg,bb,ba)
    elsif thickness = 3 then
    drawrectangle(x1,y1,x2,y2) style(line,3) coloured(r,g,b,a) borderColor(br,bg,bb,ba)
    elsif thickness = 4 then
    drawrectangle(x1,y1,x2,y2) style(line,4) coloured(r,g,b,a) borderColor(br,bg,bb,ba)
    elsif thickness = 5 then
    drawrectangle(x1,y1,x2,y2) style(line,5) coloured(r,g,b,a) borderColor(br,bg,bb,ba)
    endif
    
    return high,low
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Disegno di un rettangolo spesso


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by druby
1 year, 3 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 10/10/2024
Status: Active
Attachments: No files
Logo Logo
Loading...