|
Post by andreos on Oct 7, 2019 18:17:23 GMT
Is it possible to create a region based on the center of an object (like a radius)?
|
|
|
Post by AnkuLua on Oct 7, 2019 21:46:21 GMT
Yes. Every match is based on the center.
|
|
|
Post by andreos on Oct 7, 2019 23:58:37 GMT
Yes. Every match is based on the center. I mean: let's say I wanna find objects that are located around another object. I could get the region from the middle object and then increase the radius to find for other buildings. Is it possible? I believe region works this way: xy----w---- | | h | | | |---------- Am I right? What I was thinking was something like this (it would make sense with radius, instead): ------w------- | | h xy | | | |-------------| So, with radius, you could get a center point and make a region based on a radius from that point. Just found out I could getX and getY from the image and then manipulate it before adding W and H to form a region. This way, I could get (kinda) a region where any desirable object is in the middle. It's a painful workaround, but it works. Radius would work super cool.
|
|
|
Post by AnkuLua on Oct 8, 2019 0:41:52 GMT
You can create a region from a location. Is this what you want?
|
|
|
Post by andreos on Oct 8, 2019 0:45:36 GMT
You can create a region from a location. Is this what you want? Yes, but that location would not be the center of the region. As it says on the Basic Objects and Methods Introduction: Just found out I could getX and getY from the object and then manipulate it before adding W and H to form a region. This way, I could get (kinda) a region where any desirable object is in the middle. It's a painful workaround, but it works. Creating round based on radius, starting from the center of an object, would be super handy in this particular case. This is what I mean: round based on a radius, where the center of the round is the center of an object (it's diameter is based on the radius): pasteboard.co/IAWGPXZ.pngNow, there could be another and already working solution for this. I'm just new to Ankulua.
|
|