Exemple #1
0
        private Bitmap Widget_CreateBitmap(Bitmap widget, DrawFlags flags)
        {
            //Check
            Bitmap map = (Bitmap)widget.Clone();

            //Prepare bitmap
            if (flags.HasFlag(DrawFlags.MirrorX))
            {
                map = Widget_MirrorX(map);
            }
            if (flags.HasFlag(DrawFlags.MirrorY))
            {
                map = Widget_MirrorY(map);
            }
            if (flags.HasFlag(DrawFlags.FlipX))
            {
                map = Widget_FlipX(map);
            }
            if (flags.HasFlag(DrawFlags.FlipY))
            {
                map = Widget_FlipY(map);
            }

            //Return
            return(map);
        }
Exemple #2
0
        public static String FormatFlags(
            ModeFlags fmd, DrawFlags fdr, EGFlags feg, HiFlags fBlackHi, HiFlags fWhiteHi, LoFlags flo)
        {
            if (fmd == 0 && fdr == 0 && feg == 0 && fBlackHi == 0 && fWhiteHi == 0 && flo == 0)
            {
                return("None");
            }

            var sBlackHi         = FormatFlags(fBlackHi);
            var sWhiteHi         = FormatFlags(fWhiteHi);
            var sBlackHiLabelled = IsNullOrEmpty(sBlackHi) ? Empty : $"Black[{sBlackHi}]";
            var sWhiteHiLabelled = IsNullOrEmpty(sWhiteHi) ? Empty : $"White[{sWhiteHi}]";

            const Int32 nCapacity = 4;
            var         sFlags    = new List <String>(nCapacity)
                                    .AddNotEmpty(FormatFlags(fmd))
                                    .AddNotEmpty(FormatFlags(fdr))
                                    .AddNotEmpty(FormatFlags(feg))
                                    .AddNotEmpty(sBlackHiLabelled)
                                    .AddNotEmpty(sWhiteHiLabelled)
                                    .AddNotEmpty(FormatFlags(flo));

            return(Join(sSpace, sFlags));
        }
Exemple #3
0
 /// <summary>
 /// Clear flags from the current flags.
 /// </summary>
 public void ClearFlags(DrawFlags flags)
 {
     _drawFlags &= ~flags;
 }
Exemple #4
0
 /// <summary>
 /// Append flags to the current flags.
 /// </summary>
 public void AppendFlags(DrawFlags flags)
 {
     _drawFlags |= flags;
 }
Exemple #5
0
 public DebugDraw()
 {
     _drawFlags = 0;
 }
Exemple #6
0
 protected DebugDraw()
 {
     _drawFlags = 0;
 }
Exemple #7
0
 public static void Draw(SoftBody psb, IDebugDraw iDraw, DrawFlags drawFlags = DrawFlags.Std)
 {
     btSoftBodyHelpers_Draw(psb.Native, DebugDraw.GetUnmanaged(iDraw), drawFlags);
 }
Exemple #8
0
 public CompositData(DrawFlags drawFlags)
 {
     DrawFlags = drawFlags;
     Rect      = new Rectangle();
 }
 /// <summary>
 /// Append flags to the current flags.
 /// </summary>
 public void AppendFlags(DrawFlags flags)
 {
     _drawFlags |= flags;
 }
Exemple #10
0
		/// Set the drawing flags.
		public void SetFlags(DrawFlags flags){
			m_drawFlags = flags;
		}
Exemple #11
0
		public Draw(){
			m_drawFlags = 0;
		}
Exemple #12
0
 /// Set the drawing flags.
 public void SetFlags(DrawFlags flags)
 {
     m_drawFlags = flags;
 }
Exemple #13
0
 public Draw()
 {
     m_drawFlags = 0;
 }
Exemple #14
0
        public static String FormatFlags(DrawFlags fdr)
        {
            var en = drFlags.Where(f => (f & fdr) != 0);

            return(Join(sSpace, en));
        }
Exemple #15
0
 public void Draw(float dx, float dy, DrawFlags flags)
 {
     Allegro5.al_draw_bitmap(Ptr, dx, dy, flags);
 }
 public DebugDraw()
 {
     _drawFlags = 0;
 }
Exemple #17
0
 public static void Draw(SoftBody psb, DebugDraw iDraw, DrawFlags drawFlags = DrawFlags.Std)
 {
     btSoftBodyHelpers_Draw(psb.Native, iDraw._native, drawFlags);
 }
 /// <summary>
 /// Clear flags from the current flags.
 /// </summary>
 public void ClearFlags(DrawFlags flags)
 {
     _drawFlags &= ~flags;
 }
 static extern void btSoftBodyHelpers_Draw(IntPtr psb, IntPtr idraw, DrawFlags drawflags);