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

Method dialogBaseUnitsToPixels

window.go:1564–1571  ·  view source on GitHub ↗

dialogBaseUnitsToPixels returns size in dialog based units in native pixels.

(dlus Size)

Source from the content-addressed store, hash-verified

1562
1563// dialogBaseUnitsToPixels returns size in dialog based units in native pixels.
1564func (wb *WindowBase) dialogBaseUnitsToPixels(dlus Size) (pixels Size) {
1565 base := wb.dialogBaseUnits()
1566
1567 return Size{
1568 int(win.MulDiv(int32(dlus.Width), int32(base.Width), 4)),
1569 int(win.MulDiv(int32(dlus.Height), int32(base.Height), 8)),
1570 }
1571}
1572
1573// calculateTextSizeImpl returns text size in native pixels.
1574func (wb *WindowBase) calculateTextSizeImpl(text string) Size {

Callers 11

CreateLayoutItemMethod · 0.80
CreateLayoutItemMethod · 0.80
sizeHintForLimitMethod · 0.80
idealSizeMethod · 0.80
CreateLayoutItemMethod · 0.80
CreateLayoutItemMethod · 0.80
idealSizeMethod · 0.80
CreateLayoutItemMethod · 0.80
updateMarginsMethod · 0.80
CreateLayoutItemMethod · 0.80
CreateLayoutItemMethod · 0.80

Calls 1

dialogBaseUnitsMethod · 0.95

Tested by

no test coverage detected