//SetAspectRatio :
//
// aspectRatio Float - The aspect ratio to maintain for some portion of the content view.
//
// extraSize Size - The extra size not to be included while maintaining the aspect ratio.
//
// This will make a window maintain an aspect ratio. The extra size allows a developer to have space, specified in pixels, not included within the aspect ratio calculations. This API already takes into account the difference between a window's size and its content size.
//
// Consider a normal window with an HD video player and associated controls. Perhaps there are 15 pixels of controls on the left edge, 25 pixels of controls on the right edge and 50 pixels of controls below the player. In order to maintain a 16:9 aspect ratio (standard aspect ratio for HD @1920x1080) within the player itself we would call this function with arguments of 16/9 and [ 40, 50 ]. The second argument doesn't care where the extra width and height are within the content view--only that they exist. Sum any extra width and height areas you have within the overall content view.
//
// Calling this function with a value of 0 will remove any previously set aspect ratios.
SetAspectRatio .

aspectRatio Float - The aspect ratio to maintain for some portion of the content view.

extraSize Size - The extra size not to be included while maintaining the aspect ratio.

This will make a window maintain an aspect ratio. The extra size allows a developer to have space, specified in pixels, not included within the aspect ratio calculations. This API already takes into account the difference between a window's size and its content size.

Consider a normal window with an HD video player and associated controls. Perhaps there are 15 pixels of controls on the left edge, 25 pixels of controls on the right edge and 50 pixels of controls below the player. In order to maintain a 16:9 aspect ratio (standard aspect ratio for HD @1920x1080) within the player itself we would call this function with arguments of 16/9 and [ 40, 50 ]. The second argument doesn't care where the extra width and height are within the content view--only that they exist. Sum any extra width and height areas you have within the overall content view.

Calling this function with a value of 0 will remove any previously set aspect ratios.
// SetAspectRatio : // // aspectRatio Float - The aspect ratio to maintain for some portion of the content view . // // extraSize Size - The extra size not to be included while maintaining the aspect ratio . // // This will make a window maintain an aspect ratio . The extra size allows a developer to have space specified in pixels not included within the aspect ratio calculations . This API already takes into account the difference between a window ' s size and its content size . // // Consider a normal window with an HD video player and associated controls . Perhaps there are 15 pixels of controls on the left edge 25 pixels of controls on the right edge and 50 pixels of controls below the player . In order to maintain a 16 : 9 aspect ratio ( standard aspect ratio for HD @1920x1080 ) within the player itself we would call this function with arguments of 16 / 9 and [ 40 50 ] . The second argument doesn ' t care where the extra width and height are within the content view -- only that they exist . Sum any extra width and height areas you have within the overall content view . // // Calling this function with a value of 0 will remove any previously set aspect ratios .
func (gbw *BrowserWindow) SetAspectRatio(aspectRatio float64, extraSize string) {
	res, _ := gbw.sendAndReceiveSocketEvent(SocketEvent{Event: "setAspectRatio", Data: aspectRatioStruct{AspectRatio: aspectRatio, ExtraSize: extraSize}})
	logger.Debug().Msgf("%+v\n", res)
	panic("Not implemented")
}
func ( gbw * BrowserWindow ) SetAspectRatio ( aspectRatio float64 , extraSize string ) { res , _ := gbw . sendAndReceiveSocketEvent ( SocketEvent { Event : " " , Data : aspectRatioStruct { AspectRatio : aspectRatio , ExtraSize : extraSize } } ) logger . Debug ( ) . Msgf ( " \n " , res ) panic ( " " ) }
SetAspectRatio .
SetAspectRatio .