1

I have two intersecting circles drawn using blendMode(MULTIPLY).

A new shape is formed as a result of the intersection.

I need to determine the edge points of new shape without using math.

Is there any programmable way to determine whether a point color was set using blendMode()?

Supposed pseudocode:

if ( point.blendMode == true ) return true;
Kevin Workman
  • 41,537
  • 9
  • 68
  • 107

1 Answers1

1

You should probably just do this using math. Googling "calculate intersection of two circles" will return a ton of results.

But to answer your question, no you can't check the blend mode of a particular pixel. However, you can check the resulting color of a particular pixel.

You can do this using the get() function, which returns the color of a pixel. For example, here's how you'd check whether a pixel was red:

var redColor = color(255, 0, 0);
var pixelColor = get(42, 47);
if(pixelColor == redColor){
  // color at 42,47 is red
}

More info can be found in the reference.

Kevin Workman
  • 41,537
  • 9
  • 68
  • 107