love.graphics.circle (日本語)

円を描画します。

関数

概要

love.graphics.circle( mode, x, y, radius )

引数

DrawMode mode
円の描画方法。
number x
中心からの X 軸座標。
number y
中心からの Y 軸座標。
number radius
円の半径。

返値

ありません。

関数

概要

love.graphics.circle( mode, x, y, radius, segments )

引数

DrawMode mode
円の描画方法。
number x
中心からの X 軸座標。
number y
中心からの Y 軸座標。
number radius
円の半径。
number segments
円を描画するために使用する線分の数。注釈: 引数 segments を省略した場合の変数値は LÖVE のバージョンにより異なります。

返値

ありません。

用例

引数 segment の効果

function love.draw()
    love.graphics.setColor(1, 1, 1)
    love.graphics.circle("fill", 300, 300, 50, 100) -- 線分 100 で白色の円を描画します。
    love.graphics.setColor(1, 0, 0)
    love.graphics.circle("fill", 300, 300, 50, 5)   -- 線分 5 で赤色の円を描画します。
end

関連

 


そのほかの言語