Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates drawing customizable rectangles within containers for AI artists to enhance image compositions.
The ImageDrawRectangleByContainer node is designed to facilitate the drawing of rectangles within a specified container, making it an essential tool for AI artists looking to add geometric shapes to their images. This node allows you to define the position, size, and appearance of the rectangle, including its outline and fill colors, as well as the transparency levels. By leveraging this node, you can create precise and customizable rectangular shapes, enhancing the visual composition of your artwork. The node's functionality is particularly useful for tasks that require the addition of structured elements to an image, such as framing, highlighting specific areas, or creating complex designs.
The container parameter specifies the image or canvas where the rectangle will be drawn. It is essential as it defines the context in which the rectangle will appear. The container should be a valid image object that the node can manipulate.
The start_x parameter defines the x-coordinate of the rectangle's starting point (top-left corner). This value determines the horizontal position of the rectangle within the container. The minimum value is 0, and the maximum value is the width of the container.
The start_y parameter defines the y-coordinate of the rectangle's starting point (top-left corner). This value determines the vertical position of the rectangle within the container. The minimum value is 0, and the maximum value is the height of the container.
The end_x parameter defines the x-coordinate of the rectangle's ending point (bottom-right corner). This value determines the horizontal extent of the rectangle. The minimum value is start_x, and the maximum value is the width of the container.
The end_y parameter defines the y-coordinate of the rectangle's ending point (bottom-right corner). This value determines the vertical extent of the rectangle. The minimum value is start_y, and the maximum value is the height of the container.
The radius parameter specifies the radius of the corners if you want to create a rounded rectangle. A value of 0 means the corners will be sharp, while higher values will make the corners more rounded. The minimum value is 0.
The outline_size parameter determines the thickness of the rectangle's outline. A value of 0 means no outline, while higher values increase the outline's thickness. The minimum value is 0.
The outline_red parameter sets the red component of the outline color. The value ranges from 0 to 255, where 0 means no red and 255 means full red.
The outline_green parameter sets the green component of the outline color. The value ranges from 0 to 255, where 0 means no green and 255 means full green.
The outline_blue parameter sets the blue component of the outline color. The value ranges from 0 to 255, where 0 means no blue and 255 means full blue.
The outline_alpha parameter sets the transparency level of the outline. The value ranges from 0 to 255, where 0 means fully transparent and 255 means fully opaque.
The fill_red parameter sets the red component of the fill color. The value ranges from 0 to 255, where 0 means no red and 255 means full red.
The fill_green parameter sets the green component of the fill color. The value ranges from 0 to 255, where 0 means no green and 255 means full green.
The fill_blue parameter sets the blue component of the fill color. The value ranges from 0 to 255, where 0 means no blue and 255 means full blue.
The fill_alpha parameter sets the transparency level of the fill. The value ranges from 0 to 255, where 0 means fully transparent and 255 means fully opaque.
The top_left_corner parameter determines whether the top-left corner of the rectangle is rounded. A value of True means the corner is rounded, while False means it is sharp.
The top_right_corner parameter determines whether the top-right corner of the rectangle is rounded. A value of True means the corner is rounded, while False means it is sharp.
The bottom_right_corner parameter determines whether the bottom-right corner of the rectangle is rounded. A value of True means the corner is rounded, while False means it is sharp.
The bottom_left_corner parameter determines whether the bottom-left corner of the rectangle is rounded. A value of True means the corner is rounded, while False means it is sharp.
The SSAA parameter stands for Supersample Anti-Aliasing, which helps in smoothing the edges of the rectangle. A value of True enables SSAA, while False disables it.
The method parameter specifies the drawing method to be used. This can affect the performance and quality of the drawing process. The exact options for this parameter depend on the implementation details of the node.
The IMAGE output parameter is the resulting image with the drawn rectangle. This output is crucial as it provides the final visual result of the node's operation, which can be used for further processing or as a final artwork.
radius parameter to 0.outline_size parameter to add a border to your rectangle, which can help in highlighting or framing specific areas.fill_alpha parameter to create semi-transparent rectangles, which can be useful for overlay effects.SSAA parameter to smooth the edges of the rectangle, especially when working with high-resolution images.start_x, start_y, end_x, and end_y parameters are within the bounds of the container's dimensions.True or False.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.