MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / GetDimensions

Method GetDimensions

Source/Minimap.cpp:31–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31void Minimap::GetDimensions(float& width, float& height)
32{
33 float windowWidth = ofGetWidth();
34 float windowHeight = ofGetHeight();
35 float ratio = windowWidth / windowHeight;
36
37 if (ofGetWidth() > ofGetHeight())
38 {
39 width = kMaxLength;
40 height = floor(kMaxLength / ratio) + kBookmarkSize;
41 }
42 else
43 {
44 height = kMaxLength;
45 width = floor(kMaxLength * ratio) + kBookmarkSize;
46 }
47}
48
49void Minimap::GetDimensionsMinimap(float& width, float& height)
50{

Callers 15

DrawControlsMethod · 0.45
GetModuleDimensionsMethod · 0.45
oscMessageReceivedMethod · 0.45
DrawModuleMethod · 0.45
GetRowHeightMethod · 0.45
GetEffectPosMethod · 0.45
GetModuleDimensionsMethod · 0.45
GetModuleDimensionsMethod · 0.45
DrawMethod · 0.45
DrawModuleMethod · 0.45
GetModuleDimensionsMethod · 0.45
DrawModuleMethod · 0.45

Calls 2

ofGetWidthFunction · 0.85
ofGetHeightFunction · 0.85

Tested by 1

TestHoverMethod · 0.36