pyret-lang
pyret-lang copied to clipboard
Documentation/Functionality Error for scene-line
https://pyret.org/docs/latest/image.html#%28part._image_scene-line%29
scene-line :: ( img :: Image, x1 :: Number, y1 :: Number, x2 :: Number, y2 :: Number, background :: Image ) -> Image Draws a line from (x1,y1) to (x2,y2) on the scene background. Unlike add-line, this function crops the resulting image to be the same size as background.
But the background parameter should instead refer to a parameter of type ImageColor, as seen below for add-line:
https://pyret.org/docs/latest/image.html#%28part._image_add-line%29
add-line :: ( img :: Image, x1 :: Number, y1 :: Number, x2 :: Number, y2 :: Number, color :: ImageColor ) -> Image Creates a new image like img with a line added starting from the point (x1,y1) and going to the point (x2,y2). Unlike scene-line, if the line passes outside of img, the image gets larger to accommodate the line.
Additionally, scene-line adds a small black border around the resultant image, which is not a stated feature of either scene-line, add-line, or crop.