Exemplo n.º 1
0
 private UcrBg(_ucrBg ucrBg)
 {
     this.ucrBg = ucrBg;
     Ucr        = ToneCurve.FromHandle(ucrBg.ucr);
     Bg         = ToneCurve.FromHandle(ucrBg.bg);
     Desc       = MultiLocalizedUnicode.FromHandle(ucrBg.desc);
 }
Exemplo n.º 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);
        }
Exemplo n.º 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;
 }
Exemplo n.º 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;
        }
Exemplo n.º 5
0
 private unsafe void SetDescription(MultiLocalizedUnicode value)
 {
     SeqDesc->Description = value?.Handle ?? IntPtr.Zero;
 }
Exemplo n.º 6
0
        private unsafe MultiLocalizedUnicode GetDescription()
        {
            IntPtr ptr = SeqDesc->Description;

            return((ptr != IntPtr.Zero) ? MultiLocalizedUnicode.CopyRef(ptr) : null);
        }
Exemplo n.º 7
0
 private unsafe void SetModel(MultiLocalizedUnicode value)
 {
     SeqDesc->Model = value?.Handle ?? IntPtr.Zero;
 }
Exemplo n.º 8
0
        private unsafe MultiLocalizedUnicode GetModel()
        {
            IntPtr ptr = SeqDesc->Model;

            return((ptr != IntPtr.Zero) ? MultiLocalizedUnicode.CopyRef(ptr) : null);
        }
Exemplo n.º 9
0
 private unsafe void SetManufacturer(MultiLocalizedUnicode value)
 {
     SeqDesc->Manufacturer = value?.Handle ?? IntPtr.Zero;
 }