예제 #1
0
        public override bool ApplyLayoutingInfo()
        {
            if (!base.ApplyLayoutingInfo())
            {
                return(false);
            }

            SizingInfo = new EffectBandSizingInfo();
            // we create empty slots for the same group
            if (Index > 0)
            {
                var previousRenderer = (EffectBarRenderer)PreviousRenderer;
                SizingInfo.CopySlots(previousRenderer.SizingInfo);
            }

            foreach (var effectBand in _bands)
            {
                effectBand.AlignGlyphs();
                if (!effectBand.IsEmpty)
                {
                    // find a slot that ended before the start of the band
                    SizingInfo.Register(effectBand);
                }
            }

            UpdateHeight();

            return(true);
        }
예제 #2
0
 public void CopySlots(EffectBandSizingInfo sizingInfo)
 {
     foreach (var slot in sizingInfo.Slots)
     {
         var copy = new EffectBandSlot();
         copy.Y              = slot.Y;
         copy.Height         = slot.Height;
         copy.UniqueEffectId = slot.UniqueEffectId;
         Slots.Add(copy);
         foreach (var band in slot.Bands)
         {
             _effectSlot[band.Info.EffectId] = copy;
         }
     }
 }