This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Management; | |
using System.Text; | |
namespace ConsoleApp1 | |
{ | |
public static class MonitorsInfo | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Conserve aspect ratio of the orignal region. Useful when shrinking/enlarging | |
* images to fit into a certain area. | |
* | |
* @param {Number} srcWidth Source area width | |
* @param {Number} srcHeight Source area height | |
* @param {Number} maxWidth Fittable area maximum available width | |
* @param {Number} maxHeight Fittable area maximum available height | |
* @return {Object} { width, heigth } | |
* |
NewerOlder