From 6ead90c0f0e9b9a44c7c1f7137f437faa29fa750 Mon Sep 17 00:00:00 2001 From: tslil clingman <> Date: Sat, 30 Oct 2021 16:54:03 -0400 Subject: Switched to tracking zig-sfml-wrapper as submodule --- src/sfml/graphics/BlendMode.zig | 92 ----------------------------------------- 1 file changed, 92 deletions(-) delete mode 100644 src/sfml/graphics/BlendMode.zig (limited to 'src/sfml/graphics/BlendMode.zig') diff --git a/src/sfml/graphics/BlendMode.zig b/src/sfml/graphics/BlendMode.zig deleted file mode 100644 index d78d60d..0000000 --- a/src/sfml/graphics/BlendMode.zig +++ /dev/null @@ -1,92 +0,0 @@ -//! Blending modes for drawing (for render states) - -// Enums -pub const Factor = enum(c_int) { - zero, - one, - srcColor, - oneMinusSrcColor, - dstColor, - oneMinusDstColor, - srcAlpha, - oneMinusSrcAlpha, - dstAlpha, - oneMinusDstAlpha -}; - -pub const Equation = enum(c_int) { - add, - subtract, - reverseSubtract -}; - -const BlendMode = @This(); - -// Preset blend modes -pub const BlendAlpha = BlendMode{ - .color_src_factor = .srcAlpha, - .color_dst_factor = .oneMinusSrcAlpha, - .color_equation = .add, - .alpha_src_factor = .one, - .alpha_dst_factor = .oneMinusSrcAlpha, - .alpha_equation = .add -}; - -pub const BlendAdd = BlendMode{ - .color_src_factor = .srcAlpha, - .color_dst_factor = .one, - .color_equation = .add, - .alpha_src_factor = .one, - .alpha_dst_factor = .one, - .alpha_equation = .add -}; - -pub const BlendMultiply = BlendMode{ - .color_src_factor = .dstColor, - .color_dst_factor = .zero, - .color_equation = .add, - .alpha_src_factor = .dstColor, - .alpha_dst_factor = .zero, - .alpha_equation = .add -}; - -pub const BlendMin = BlendMode{ - .color_src_factor = .one, - .color_dst_factor = .one, - .color_equation = .min, - .alpha_src_factor = .one, - .alpha_dst_factor = .one, - .alpha_equation = .min -}; - -pub const BlendMax = BlendMode{ - .color_src_factor = .one, - .color_dst_factor = .one, - .color_equation = .max, - .alpha_src_factor = .one, - .alpha_dst_factor = .one, - .alpha_equation = .max -}; - -pub const BlendNone = BlendMode{ - .color_src_factor = .one, - .color_dst_factor = .zero, - .color_equation = .add, - .alpha_src_factor = .one, - .alpha_dst_factor = .zero, - .alpha_equation = .add -}; - -const sfBlendMode = @import("../sfml_import.zig").c.sfBlendMode; -/// Bitcasts this blendmode to the csfml struct -/// For inner workings -pub fn _toCSFML(self: BlendMode) sfBlendMode { - return @bitCast(sfBlendMode, self); -} - -color_src_factor: Factor, -color_dst_factor: Factor, -color_equation: Equation, -alpha_src_factor: Factor, -alpha_dst_factor: Factor, -alpha_equation: Equation \ No newline at end of file -- cgit v1.3.1