Return the value for background-size property.
184960
function getBackgroundSize(image) {
	var x = image.properties.width / image.ratio;
	var y = image.properties.height / image.ratio;
	var template = _.template('<%= x %>px <%= y %>px');

	return template({x: x, y: y});
}
427426
def console_get_background_flag(con: tcod.console.Console) -> int:
    
    return int(lib.TCOD_console_get_background_flag(_console(con)))
1076200
function getBackgroundPoint(vm, size, alignment, chart) {
	// Background Position
	var x = vm.x;
	var y = vm.y;

	var caretSize = vm.caretSize;
	var caretPadding = vm.caretPadding;
	var cornerRadius = vm.cornerRadius;
	var xAlign = alignment.xAlign;
	var yAlign = alignment.yAlign;
	var paddingAndSize = caretSize + caretPadding;
	var radiusAndPadding = cornerRadius + caretPadding;

	if (xAlign === 'right') {
		x -= size.width;
	} else if (xAlign === 'center') {
		x -= (size.width / 2);
		if (x + size.width > chart.width) {
			x = chart.width - size.width;
		}
		if (x < 0) {
			x = 0;
		}
	}

	if (yAlign === 'top') {
		y += paddingAndSize;
	} else if (yAlign === 'bottom') {
		y -= size.height + paddingAndSize;
	} else {
		y -= (size.height / 2);
	}

	if (yAlign === 'center') {
		if (xAlign === 'left') {
			x += paddingAndSize;
		} else if (xAlign === 'right') {
			x -= paddingAndSize;
		}
	} else if (xAlign === 'left') {
		x -= radiusAndPadding;
	} else if (xAlign === 'right') {
		x += radiusAndPadding;
	}

	return {
		x: x,
		y: y
	};
}
1235120
def value(self):
        """"""
        return {
            "type" : self._type,
            "style" : self._style,
            "color" : self._color.value,
            "width" : self._width
        }
798720
def value(self):
        """"""
        if self._outline is None:
            return {
                "type" : "esriSMS",
                "style" : self._style,
                "color" : self._color.value,
                "size" : self._size,
                "angle" : self._angle,
                "xoffset" : self._xoffset,
                "yoffset" : self._yoffset
            }
        else:
            return {
                "type" : "esriSMS",
                "style" : self._style,
                "color" : self._color.value,
                "size" : self._size,
                "angle" : self._angle,
                "xoffset" : self._xoffset,
                "yoffset" : self._yoffset,
                "outline" : {
                    "width" : self._outline['width'],
                    "color" : self._color.value
                }
            }
727634
def min_pixels(self, value: float) -> 'Size':
        """"""
        raise_not_number(value)
        self.minimum = '{}px'.format(value)
        return self
176930
def getOverlayTextureSize(self, ulOverlayHandle):
        """"""

        fn = self.function_table.getOverlayTextureSize
        pWidth = c_uint32()
        pHeight = c_uint32()
        result = fn(ulOverlayHandle, byref(pWidth), byref(pHeight))
        return result, pWidth.value, pHeight.value
189217
def get_value(self):
        """"""
        from spyder.utils.system import memory_usage
        text = '%d%%' % memory_usage()
        return 'Mem ' + text.rjust(3)
1265497
def getDimensionForImage(filename, maxsize):
    """"""
    try:
        from PIL import Image
    except ImportError:
        return None
    img = Image.open(filename)
    width, height = img.size
    if width > maxsize[0] or height > maxsize[1]:
        img.thumbnail(maxsize)
        out.info("Downscaled display size from %s to %s" % ((width, height), img.size))
    return img.size
43722
def getPositionAndSize(self):
        '''
        
        '''

        (x, y) = self.getXY();
        w = self.getWidth()
        h = self.getHeight()
        return (x, y, w, h)
1210728
function background(options) {
    options = options || {};
    // ReSharper disable once UnusedParameter
    return function (config) {
        var values = [];
        [
            'attachment',
            'clip',
            'color',
            'image',
            'origin',
            'position',
            'repeat',
            'size'
        ].forEach(function (prop) {
            if (options.hasOwnProperty(prop)) {
                values.push(options[prop]);
            }
        });
        if (values.length) {
            return [['background', values.join(' ')]];
        }
        return [];
    };
}
1060158
def width(self, width=None):
        """"""

        if width is None:
            return self._width
        else:
            if not is_numeric(width):
                raise TypeError("width must be numeric, not '%s'" % str(width))
            self._width = width
917328
function getBackgroundPosition(image) {
	var logicValue = image.isSVG ? 1 : -1;
	var x = logicValue * (image.ratio > 1 ? image.coordinates.x / image.ratio : image.coordinates.x);
	var y = logicValue * (image.ratio > 1 ? image.coordinates.y / image.ratio : image.coordinates.y);
	var template = _.template('<%= (x ? x + "px" : x) %> <%= (y ? y + "px" : y) %>');
	return template({x: x, y: y});
}
1145368
def identifier(self):
        """"""
        if self.background_identifier is None:
            idsum = self._identifier_data()
        else:
            idsum = hash_obj([self._identifier_data(),
                              self.background_identifier])
        return idsum
859329
def foreground(self):
        """"""
        code = self.ESC + "38;5;"
        if str(self.color).isdigit():
            self.reverse_dict()
            color = self.reserve_paint[str(self.color)]
            return code + self.paint[color] + self.END
        elif self.color.startswith("#"):
            return code + str(self.HEX) + self.END
        else:
            return code + self.paint[self.color] + self.END
634953
def background_color_attribute(styles={})
      return nil if styles.nil?
      value = styles[:background_color]
      return nil unless value && value.is_a?(UIColor)
      value
    end
810777
def background_color(self, node, depth):
        """"""
        if self.color_mapping is None:
            self.color_mapping = {}
        color = self.color_mapping.get(node.key)
        if color is None:
            depth = len(self.color_mapping)
            red = (depth * 10) % 255
            green = 200 - ((depth * 5) % 200)
            blue = (depth * 25) % 200
            self.color_mapping[node.key] = color = wx.Colour(red, green, blue)
        return color