共找到2條詞條名為ClearScreen的結果 展開

ClearScreen

PC Logo 語言命令

CLEARSCREEN,PC Logo 中的一個命令,清除屏幕圖形,返回烏龜到屏幕中心,並將烏龜的頭的方向設為 0,不影響畫筆狀態和畫筆顏色。縮寫為 CS。

概述


此命令的語法是:
CLEARSCREEN
CS

PC Logo 幫助頁面


英文原版

CLEARSCREEN (CS)
Syntax
CLEARSCREEN
CS
Explanation
CLEARSCREEN erases the graphics screen, returns the turtle to the center of the screen, and sets the turtle's heading to 0. CLEARSCREEN does not affect the pen state or screen colors.
See also CLEAN and DRAW.
Example
Example
Example

中文翻譯

CLEARSCREEN (CS)
語法
CLEARSCREEN
CS
說明
CLEARSCREEN 清除屏幕圖形,返回烏龜到屏幕中心,並將烏龜的頭的方向設為 0。CLEARSCREEN 不影響畫筆狀態和畫筆顏色。
參見 CLEAN 和 DRAW。
示例
示例
示例

CLEARSCREEN、CLEAN、DRAW 的區別


CLEAN

CLEAN
Syntax
CLEAN
Explanation
CLEAN erases the graphics screen but does not affect the heading or position of the turtle. See also CLEARSCREEN and DRAW.
CLEAN
語法
CLEAN
說明
CLEAN 清除屏幕圖形,但是不影響烏龜的頭的方向和位置。參見 CLEARSCREEN 和 DRAW。

DRAW

DRAW
Syntax
DRAW
Explanation
DRAW prepares the graphics screen for drawing by doing the following:
- Clears the screen.
- Homes the turtle.
- Shows the turtle.
- Puts the pen down.
- Sets the pen color to color 0.
- Sets the background color to color 15.
- Sets the turtle's pen width to 1.
- Resets the turtle font to the system font
- Sets to WRAP mode.
DRAW
語法
DRAW
說明
DRAW 通過執行以下操作,為畫圖準備屏幕圖形:
- 清空屏幕。
- 使烏龜回到原始位置。
- 顯示烏龜。
- 把畫筆放下。
- 把畫筆顏色設為顏色 0。
- 把背景顏色設為顏色 15。
- 把烏龜的畫筆寬度設為 1。
- 重設烏龜字體為系統字體
- 設為 WRAP 模式。

區別

概括起來,這三個命令的區別主要在:
1. CLEARSCREEN 移動烏龜位置,並改變烏龜方向;而 CLEAN 不做。
2. DRAW 初始化 PC Logo 的設置。