mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-02-04 06:23:45 +00:00
prefer underscore on fields
This commit is contained in:
@@ -29,11 +29,11 @@ const Page = @import("../../Page.zig");
|
||||
const CanvasRenderingContext2D = @This();
|
||||
/// Fill color.
|
||||
/// TODO: Add support for `CanvasGradient` and `CanvasPattern`.
|
||||
fill_style: color.RGBA = color.RGBA.Named.black,
|
||||
_fill_style: color.RGBA = color.RGBA.Named.black,
|
||||
|
||||
pub fn getFillStyle(self: *const CanvasRenderingContext2D, page: *Page) ![]const u8 {
|
||||
var w = std.Io.Writer.Allocating.init(page.call_arena);
|
||||
try self.fill_style.format(&w.writer);
|
||||
try self._fill_style.format(&w.writer);
|
||||
return w.written();
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ pub fn setFillStyle(
|
||||
value: []const u8,
|
||||
) !void {
|
||||
// Prefer the same fill_style if fails.
|
||||
self.fill_style = color.RGBA.parse(value) catch self.fill_style;
|
||||
self._fill_style = color.RGBA.parse(value) catch self._fill_style;
|
||||
}
|
||||
|
||||
pub fn getGlobalAlpha(_: *const CanvasRenderingContext2D) f64 {
|
||||
|
||||
Reference in New Issue
Block a user