/// <summary> /// Set the clipping mode for this path and IsClipping to true. /// <para>IsFilled and IsStroked flags will be set to false.</para> /// </summary> public void SetClipping(FillingRule fillingRule) { IsFilled = false; IsStroked = false; IsClipping = true; FillingRule = fillingRule; }
public void ModifyClippingIntersect(FillingRule clippingRule) { if (CurrentPath == null) { return; } AddCurrentSubpath(); CurrentPath.SetClipping(clippingRule); if (clipPaths) { var currentClipping = GetCurrentState().CurrentClippingPath; currentClipping.SetClipping(clippingRule); var newClippings = CurrentPath.Clip(currentClipping); if (newClippings == null) { log.Warn("Empty clipping path found. Clipping path not updated."); } else { GetCurrentState().CurrentClippingPath = newClippings; } } }
/// <summary> /// Initializes a new instance of the Rasterizer class. /// </summary> public Rasterizer() { m_filling_rule = FillingRule.FillNonZero; m_outline = new Outline(); m_scanline = new Scanline(); m_gamma = new byte[256]; Array.Copy(defaultGamma, m_gamma, m_gamma.Length); }
public FloodFill(Color fillColor, int tolerance0To255) { if (tolerance0To255 > 0) { fillRule = new ToleranceMatch(fillColor, tolerance0To255); } else { fillRule = new ExactMatch(fillColor); } }
public FloodFill(RGBA_Bytes fillColor, int tolerance0To255) { if (tolerance0To255 > 0) { fillRule = new ToleranceMatch(fillColor, tolerance0To255); } else { fillRule = new ExactMatch(fillColor); } }
public GLScanlineRasterizer() { m_cellAARas = new CellAARasterizer(); m_vectorClipper = new VectorClipper(m_cellAARas); m_filling_rule = FillingRule.NonZero; m_auto_close = true; mul_start_x = 0; mul_start_y = 0; m_status = Status.Initial; for (int i = AA_SCALE - 1; i >= 0; --i) { m_gammaLut[i] = i; } }
public static FillMode ToSystemFillMode(FillingRule fillingRule) { #pragma warning disable IDE0066 // Convert switch statement to expression switch (fillingRule) #pragma warning restore IDE0066 // Convert switch statement to expression { case FillingRule.NonZeroWinding: return(FillMode.Winding); case FillingRule.None: case FillingRule.EvenOdd: default: return(FillMode.Alternate); } }
public void FillPath(FillingRule fillingRule, bool close) { if (CurrentPath == null) { return; } CurrentPath.SetFilled(fillingRule); if (close) { CurrentSubpath?.CloseSubpath(); } ClosePath(); }
public ScanlineRasterizer() { _cellAARas = new CellAARasterizer(); _vectorClipper = new VectorClipper(_cellAARas); _filling_rule = FillingRule.NonZero; _auto_close = true; _mul_start_x = 0; _mul_start_y = 0; _status = Status.Initial; for (int i = AA_SCALE - 1; i >= 0; --i) { _orgGammaLut[i] = i; } _gammaLut = _orgGammaLut; _useDefaultGammaLut = true; }
//-------------------------------------------------------------------- public RasterizerScanlineAA(IVectorClipper <T> rasterizer_sl_clip) { m_outline = new RasterizerCellsAA(); m_VectorClipper = rasterizer_sl_clip; m_filling_rule = filling_rule_e.NonZero; m_auto_close = true; m_start_x = 0; m_start_y = 0; m_status = ScanlineStatus.Initial; int i; for (i = 0; i < (int)AAScale.Scale; i++) { m_gamma[i] = i; } }
//bool _filpY; public ScanlineRasterizer(int w, int h) { this._renderSurfaceW = w; this._renderSurfaceH = h; //_filpY = true; m_cellAARas = new CellAARasterizer(); m_vectorClipper = new VectorClipper(m_cellAARas); m_filling_rule = FillingRule.NonZero; m_auto_close = true; mul_start_x = 0; mul_start_y = 0; m_status = Status.Initial; for (int i = AA_SCALE - 1; i >= 0; --i) { m_gammaLut[i] = i; } }
public RasterizerCompoundAA() { m_Rasterizer = new RasterizerCellsAA(); m_VectorClipper = new VectorClipper <T>(); m_filling_rule = FillingRule.NonZero; m_layer_order = LayerOrder.Direct; m_styles = new VectorPOD <StyleInfo>(); // Active Styles m_ast = new VectorPOD <uint>(); // Active Style Table (unique values) m_asm = new VectorPOD <byte>(); // Active Style Mask m_cells = new VectorPOD <CellAA>(); m_cover_buf = new VectorPOD <byte>(); m_master_alpha = new VectorPOD <uint>(); m_min_style = (0x7FFFFFFF); m_max_style = (-0x7FFFFFFF); m_start_x = (0); m_start_y = (0); m_scan_y = (0x7FFFFFFF); m_sl_start = (0); m_sl_len = (0); }
public FloodFill(FillingRule fillRule) { this.fillRule = fillRule; }
public void FillStrokePath(FillingRule fillingRule, bool close) { }
public FloodFill(Color fillColor) { fillRule = new ExactMatch(fillColor); }
public FloodFill(RGBA_Bytes fillColor) { fillRule = new ExactMatch(fillColor); }
/// <summary> /// Set the filling rule for this path and IsFilled to true. /// </summary> public void SetFilled(FillingRule fillingRule) { IsFilled = true; FillingRule = fillingRule; }
public ScanlineRasterizer() { m_cellAARas = new CellAARasterizer(); m_vectorClipper = new VectorClipper(m_cellAARas); m_filling_rule = FillingRule.NonZero; m_auto_close = true; mul_start_x = 0; mul_start_y = 0; m_status = Status.Initial; for (int i = AA_SCALE - 1; i >= 0; --i) { m_gammaLut[i] = i; } }
public void ModifyClippingIntersect(FillingRule clippingRule) { }