javagraphicsacm-java-libraries

Bolding Shape Lines in Java


Bolding the shape lines

After creating the shape (for example GOval), how can I bold the shape lines?


Solution

  • AFAIK, there is no such thing as setting a shape line "bold" in the ACM API. What would "bold" be anyway? You would need to specify a "line thickness" value yourself, but I don't think the API caters for this, and there is no default constant for SHAPE_LINE_BOLD or similar.

    Instead, think about how you can achieve the effect otherwise. GOval implements GFillable, i.e., you can fill your oval with a specific colour. Perhaps look into overlaying more than one filled shape.

    Hint: If you filled your shape with the same colour as the background, would it be visible?