graphics.drawingColor, but no graphics.fillColor

Changing graphics.forecolor to graphics.drawingColor doesn’t make sense to me.
The name suggests that this color is only used for some “draw” commands, such as “drawRect”, but there is no matching “fillColor” property to use with the “fill” functions.

I propose that graphics.drawingColor name be changed to something more generic which would immediately help the user understand that this property is for both drawing and filling.

Graphics.currentColor?

1 Like

How about having two options: graphics.linecolor and graphics.fillcolor

1 Like

Btw you can implement this easily for yourself …

Apple’s API has two separate functions, but that also allows you to use one command to draw a filled shape and the lines around it in one go. Xojo doesn’t have that ability (to the best of my knowledge).

Indeed you can, but this adds overhead due to method entry, and when doing drawing, you want it to be as fast as possible.

It would be great if Xojo would implement Macros or Aliases. A Macro gets embedded at compile time (so no method overhead) and an alias would allow to you use whatever name you like, but at compile would use the original function.

Love TypeAlias in Swift … :+1:

1 Like

Yeah Type Aliases in Xojo would help me out a lot too.

<https://xojo.com/issue/39802>
<https://xojo.com/issue/12252>

But they’re so far down the ranking, that I have no hope we’ll ever see them :frowning:

If my memory is correct, there was FillColor (fill a surface) and FrameColor (draw a border line) in old development tool.

I also had Paint (Bitmap) and Draw (Vector).

But - like me - people forgot and invent anything (reinvent the wheel).

1 Like