How to draw a rectangle with a filled color

Forums ProRealTime English forum ProBuilder support How to draw a rectangle with a filled color

  • This topic has 7 replies, 4 voices, and was last updated 1 day ago by avatardbl007.
Viewing 8 posts - 1 through 8 (of 8 total)
  • #247291

    Ho to draw a rectangle with that is filled with a specific color?

    #247292
    JS

    Try this one:

     

    1 user thanked author for this post.
    #247294

    Thks.

    #247296

    It is also possible to use coloured and bordercolor to fill the rectangle/triangle.

    Note that if you use coloured alone, it will only color the rectangle (not filling the inside). If you add bordercolor instruction, then you will color the rectangle and fill it (with same or different color as you wish).

    If you want just to fill it, then fillcolor is the best. You can also use bordercolor and fillcolor in order to have 2 diferent color for the rectangle and the filling…

    1 user thanked author for this post.
    #247329

    Hi. Finally, you can adjust the transparency (0–255): fillcolor(r, g, b, transparency)
    This also applies to all color instructions: drawsegment(x1, y1, x2, y2) coloured(r, g, b, transparency)

    #247353

    Thks for the excellent info.
    Plse explain difference between coloured(0,255,0)  and bordercolor(“red”,255).  I notice that at https://www.prorealcode.com/prorealtime-documentation/ , bordercolor is not listed but it is found in proBuilder manual.
    For the transparency,  fillcolor(r, g, b, transparency),  the smaller value of transparency means less transparent?

     

    #247354

    For the 3 of them (coloured, bordercolor and fillcolor) you can use either the “color name” or R,G,B numbers and the transparency :
    – (“colorname”,tansparency)
    – (R,G,B,tansparency)

    transparency can go from 0 (completly transparent) to 255 (no transparency)

    * Bordercolor instruction can only color rectangle/triangle itself (as it is a segment/line that draws the rectangle/triangle, you can add “style” instruction for the width or/and the style of the line, dotted or not…)
    * fillcolor instruction can only color/fill the inside of the rectangle/triangle
    * coloured instruction can do both (the color of the rectangle/triangle OR the inside filling) : if it is used alone, it will color the rectangle/triangle itself, if it is used with bordercolor (after of before it), it will color/fill the inside of the rectangle/triangle.

    1 user thanked author for this post.
    #247419

    Thks for the explanation.

Viewing 8 posts - 1 through 8 (of 8 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login