Пример #1
0
 private UcrBg(_ucrBg ucrBg)
 {
     this.ucrBg = ucrBg;
     Ucr        = ToneCurve.FromHandle(ucrBg.ucr);
     Bg         = ToneCurve.FromHandle(ucrBg.bg);
     Desc       = MultiLocalizedUnicode.FromHandle(ucrBg.desc);
 }
Пример #2
0
        public bool Add(string name, string value, MultiLocalizedUnicode displayName, MultiLocalizedUnicode displayValue)
        {
            EnsureNotDisposed();

            return(Interop.DictAddEntry(_handle, name, value,
                                        displayName?.Handle ?? IntPtr.Zero,
                                        displayValue?.Handle ?? IntPtr.Zero) != 0);
        }
Пример #3
0
 /// <summary>
 /// Initialises a new instance of the <see cref="UcrBg"/> class.
 /// </summary>
 /// <param name="ucr">A tone curve for under color removal.</param>
 /// <param name="bg">A tone curve for black generation.</param>
 /// <param name="desc">A description of the method used for under color removal and black generation.</param>
 public UcrBg(ToneCurve ucr, ToneCurve bg, MultiLocalizedUnicode desc)
 {
     Ucr        = ucr;
     ucrBg.ucr  = ucr.Handle;
     Bg         = bg;
     ucrBg.bg   = bg.Handle;
     Desc       = desc;
     ucrBg.desc = desc.Handle;
 }
Пример #4
0
        internal DictEntry(IntPtr handle)
        {
            var entry = Marshal.PtrToStructure <_DictEntry>(handle);

            Handle      = handle;
            DisplayName = entry.DisplayName != IntPtr.Zero
                    ? MultiLocalizedUnicode.CopyRef(entry.DisplayName) : null;
            DisplayValue = entry.DisplayValue != IntPtr.Zero
                    ? MultiLocalizedUnicode.CopyRef(entry.DisplayValue) : null;
            Name  = entry.Name;
            Value = entry.Value;
            Next  = entry.Next;
        }
Пример #5
0
 private unsafe void SetDescription(MultiLocalizedUnicode value)
 {
     SeqDesc->Description = value?.Handle ?? IntPtr.Zero;
 }
Пример #6
0
        private unsafe MultiLocalizedUnicode GetDescription()
        {
            IntPtr ptr = SeqDesc->Description;

            return((ptr != IntPtr.Zero) ? MultiLocalizedUnicode.CopyRef(ptr) : null);
        }
Пример #7
0
 private unsafe void SetModel(MultiLocalizedUnicode value)
 {
     SeqDesc->Model = value?.Handle ?? IntPtr.Zero;
 }
Пример #8
0
        private unsafe MultiLocalizedUnicode GetModel()
        {
            IntPtr ptr = SeqDesc->Model;

            return((ptr != IntPtr.Zero) ? MultiLocalizedUnicode.CopyRef(ptr) : null);
        }
Пример #9
0
 private unsafe void SetManufacturer(MultiLocalizedUnicode value)
 {
     SeqDesc->Manufacturer = value?.Handle ?? IntPtr.Zero;
 }