/// <summary> /// Gets the size of. /// </summary> /// <returns>size of the structure</returns> public int GetSizeOf() { int res = 1; if (fillStyleType == (byte)FillStyleType.SolidFill && rgbColor != null) { res += rgbColor.GetSizeOf(); } if (fillStyleType == (byte)FillStyleType.RadialGradientFill || fillStyleType == (byte)FillStyleType.LinearGradientFill) { if (gradientMatrix != null) { res += gradientMatrix.GetSizeOf(); } if (gradient != null) { res += gradient.GetSizeOf(); } } if (fillStyleType == (byte)FillStyleType.RepeatingBitmapFill || fillStyleType == (byte)FillStyleType.ClippedBitmapFill || fillStyleType == (byte)FillStyleType.NonSmoothedClippedBitmap || fillStyleType == (byte)FillStyleType.NonSmoothedRepeatingBitmap) { res += 2; if (bitmapMatrix != null) { res += bitmapMatrix.GetSizeOf(); } } return(res); }
/// <summary> /// Gets the size of. /// </summary> /// <returns>size of this object type</returns> public int GetSizeOf() { int res = 1; if (color != null) { res += color.GetSizeOf(); } return(res); }
/// <summary> /// Gets the size of. /// </summary> /// <returns>SIze of this object</returns> public int GetSizeOf() { bool styleFlagsHasFont = HasFont(); bool styleFlagsHasColor = HasColor(); bool styleFlagsHasYOffset = HasYOffset(); bool styleFlagsHasXOffset = HasXOffset(); int res = 1; if (styleFlagsHasFont) { res += 2; } if (styleFlagsHasColor) { res += textColor.GetSizeOf(); } if (styleFlagsHasXOffset) { res += 2; } if (styleFlagsHasYOffset) { res += 2; } if (styleFlagsHasFont) { res += 2; } res++; if (this.glyphEntries != null) { res += glyphEntries.GetSizeOf(); } return(res); }
/// <summary> /// Gets the size of. /// </summary> /// <returns>size of this object</returns> public int GetSizeOf() { return(2 + rgb.GetSizeOf()); }