← 수업 제작 도구
홈 › Components › Sketch (그림판) › 화면 16

화면 16. Sketch.background [sink]

원본: Computation Layer 문서(Sketch (그림판)) · Try It (원본 화면)

화면 번호16 / 34
문서 항목 설명 (원문)background Sets the background of the sketch.

1. 화면 캡처 (빨간 번호 = 아래 표의 번호)

화면 16 캡처

2. CL이 입력된 곳

코드 안의 회색 줄은 원문 영어 주석이고, 파란 줄은 그 영어 주석의 번역이며, 연분홍 줄은 코드가 하는 일의 설명이다.

번호이름종류CL 코드 원문, 번역, 설명
1레이블 없는 그림판그림판
# This code brings the graph from this screen into the
# sketch as a background layer.
▷ 이 코드는 이 화면의 그래프를 배경 레이어로 그림판에 가져온다.

background: graphLayer(graph.calculatorState)
▶ 그림판의 배경(background)은 graphLayer(graph.calculatorState), 즉 이 화면의 그래프 graph를 배경 레이어로 가져온 것으로 한다.
background는 그림판의 배경을 정한다. graph.calculatorState는 그래프 graph의 전체 상태를 가져오고, graphLayer는 그 상태로 그래프 레이어를 만든다.