Reputation: 768
How can I get color of element (eg. boundary) by using official API?
I assume that it's save in database in t_objects -> backcolor, but I cannot find property/method in Element
to get it.
Upvotes: 0
Views: 172
Reputation: 36305
There is none. You need to use
repository.SQLQuery("SELECT Backcolor, Bordercolor, BoderWidth, Fontcolor FROM t_object WHERE ...")
Coloring values in EA have simple RGB values without transparency. Each red, blue and green value can take an intensity from 0 to 255. The RGB itself is calculated by
RGB = (blue * 256 + green) * 256 + red
The default coloring is equal to -1.
From my Scripting EA book.
Upvotes: 1