{{newin (日本語)|[[0.2.0 (日本語)|0.2.0]]|020|type=関数}}
Sets the [[BlendMode|blending mode]].

== 関数 ==
=== 概要 ===
<source lang="lua">
love.graphics.setBlendMode( mode )
</source>
=== 引数 ===
{{param (日本語)|BlendMode|mode|The blend mode to use.}}
=== 返値 ===
ありません。

== 関数 ==
{{newin (日本語)|[[0.10.0 (日本語)|0.10.0]]|100|type=異形}}
=== 概要 ===
<source lang="lua">
love.graphics.setBlendMode( mode, alphamode )
</source>
=== 引数 ===
{{param (日本語)|BlendMode|mode|The blend mode to use.}}
{{param (日本語)|BlendAlphaMode|alphamode ("alphamultiply")|What to do with the alpha of drawn objects when blending.}}
=== 返値 ===
ありません。
=== 注釈 ===
The default "alphamultiply" alpha mode should normally be preferred except when drawing content with pre-multiplied alpha. If content is drawn to a [[Canvas]] using the "alphamultiply" mode, the Canvas texture will have pre-multiplied alpha afterwards, so the "premultiplied" alpha mode should generally be used when drawing a Canvas to the screen.

==Example==
<source lang="lua">
function love.load()
	love.graphics.setBackgroundColor(54/255, 172/255, 248/255)
end

function love.draw()
	love.graphics.setBlendMode("alpha") --Default blend mode
	love.graphics.setColor(230/255, 44/255, 123/255)
	love.graphics.rectangle("fill", 50, 50, 100, 100)
	
	love.graphics.setColor(12/255, 100/255, 230/255)
	love.graphics.setBlendMode("multiply")
	love.graphics.rectangle("fill", 75, 75, 125, 125)
end
</source>

== 関連 ==
* [[parent::love.graphics (日本語)]]
* [[love.graphics.getBlendMode (日本語)]]
* [[BlendMode (日本語)]]
[[Category:Functions (日本語)]]
{{#set:Description=Sets the blending mode.}}
{{#set:Sub-Category=State (日本語)}}
== そのほかの言語 ==
{{i18n (日本語)|love.graphics.setBlendMode}}