public Segment2D?Clip(Segment2D segment) { Segment2D?nullable = new Segment2D?(segment); for (int index = 0; index < this.iinsideTester_0.Length; ++index) { nullable = BlinnClipper2D.smethod_0(nullable.Value, this.iinsideTester_0[index]); if (!nullable.HasValue) { break; } } return(nullable); }
public unsafe Rasterizer2D(int width, int height) { this.int_0 = width; this.int_1 = height; this.byte_0 = new byte[width * height * 4]; this.gchandle_0 = GCHandle.Alloc((object)this.byte_0, GCHandleType.Pinned); IntPtr scan0 = Marshal.UnsafeAddrOfPinnedArrayElement((Array)this.byte_0, 0); this.pUint_0 = (uint *)scan0.ToPointer(); this.bitmap_0 = new Bitmap(width, height, width * 4, PixelFormat.Format32bppArgb, scan0); this.blinnClipper2D_0 = new BlinnClipper2D(new BlinnClipper2D.IInsideTester[4] { BlinnClipper2D.Fixed.RightOf.Instance, (BlinnClipper2D.IInsideTester) new BlinnClipper2D.Generic.LeftOf((double)(this.bitmap_0.Width - 1)), BlinnClipper2D.Fixed.Above.Instance, (BlinnClipper2D.IInsideTester) new BlinnClipper2D.Generic.Under((double)(this.bitmap_0.Height - 1)) }); }