MCPcopy Create free account
hub / github.com/lxn/walk / NewBitmap

Function NewBitmap

bitmap.go:54–57  ·  view source on GitHub ↗

NewBitmap creates an opaque bitmap with given size in 1/96" units at screen DPI. Deprecated: Newer applications should use NewBitmapForDPI.

(size Size)

Source from the content-addressed store, hash-verified

52//
53// Deprecated: Newer applications should use NewBitmapForDPI.
54func NewBitmap(size Size) (*Bitmap, error) {
55 dpi := screenDPI()
56 return newBitmap(SizeFrom96DPI(size, dpi), false, dpi)
57}
58
59// NewBitmapForDPI creates an opaque bitmap with given size in native pixels and DPI.
60func NewBitmapForDPI(size Size, dpi int) (*Bitmap, error) {

Callers

nothing calls this directly

Calls 3

screenDPIFunction · 0.85
newBitmapFunction · 0.85
SizeFrom96DPIFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…