The code is as follows
This imagefill is populated from the second third parameter, the x, y coordinates, but why is the entire PNG populated?
Reply to discussion (solution)
The second and third parameters of the Imagefill are a point in the filled area
This point spreads around as a seed (originating point)
Can you understand?
The second and third parameters of the Imagefill are a point in the filled area
This point spreads around as a seed (originating point)
Can you understand?
So how can we just fill in a part of it?
Imagefilledarc--Draw an elliptical arc and fill
Imagefilledarc--Draw an elliptical arc and fill
Imagefilledpolygon--Draw a polygon and fill
Imagefilledrectangle--Draw a rectangle and fill
Imagefilltoborder--The area fills the boundary of the specified color
Imagefilledarc--Draw an elliptical arc and fill
Imagefilledarc--Draw an elliptical arc and fill
Imagefilledpolygon--Draw a polygon and fill
Imagefilledrectangle--Draw a rectangle and fill
Imagefilltoborder--The area fills the boundary of the specified color
Can you tell me about Imagefill? The diffusion you're talking about is just smattering.
Don't you read the manual?
There are sample codes in the manual
Don't you read the manual?
There are sample codes in the manual
Imagefill () performs an area fill with a color color at the coordinates x, y (0, 0) of the image image (that is, the same as x, Y point color, and adjacent points are populated). It's written in the manual, and I don't see it.
Not that, dot (x, y) is a seed, and of course the seed will only breed the same offspring.
If the point (x, y) is red, then the red dots adjacent to him will be changed.
This is your own move, and meditation alone is not understandable.
$im = Imagecreatetruecolor (+), $white = Imagecolorallocate ($im, 255, 255, 255); $red = Imagecolorallocate ($im, 255, 0 , 0); $green = imagecolorallocate ($im, 0, 255, 0); $blue = imagecolorallocate ($im, 0, 0, 255); Imagefill ($im, 0, 0, $white); I Magerectangle ($im, $red), Imagefill ($im, Wuyi, $green), Imagepng ($im);
This is your own move, and meditation alone is not understandable.
$im = Imagecreatetruecolor (+), $white = Imagecolorallocate ($im, 255, 255, 255); $red = Imagecolorallocate ($im, 255, 0 , 0); $green = imagecolorallocate ($im, 0, 255, 0); $blue = imagecolorallocate ($im, 0, 0, 255); Imagefill ($im, 0, 0, $white); I Magerectangle ($im, $red), Imagefill ($im, Wuyi, $green), Imagepng ($im);
Yes, I got it.