Exemple #1
0
        private CSSSize MeasureInternal(IntPtr node, float width, CSSMeasureMode widthMode, float height, CSSMeasureMode heightMode)
        {
            if (this._measureFunction == null)
            {
                throw new InvalidOperationException("Measure function is not defined.");
            }
            long measureOutput = this._measureFunction(this, width, widthMode, height, heightMode);

            return(new CSSSize
            {
                width = (float)MeasureOutput.GetWidth(measureOutput),
                height = (float)MeasureOutput.GetHeight(measureOutput)
            });
        }
 public static long Make(double width, double height)
 {
     return(MeasureOutput.Make((int)width, (int)height));
 }