IVectorPathData.Version
IVectorPathData.Version property
Ottiene o imposta la versione.
public int Version { get; set; }
Valore della proprietà
La versione.
Esempi
Questo esempio dimostra il supporto della risorsa ‘WorkingPathResource’ in PsdImage.ImageResources per il corretto funzionamento dell’operazione Crop.
[C#]
// Ritaglia l'immagine e salva.
using (var psdImage = (PsdImage)Image.Load(sourceFile))
{
// Cerca la risorsa WorkingPathResource.
ResourceBlock[] imageResources = psdImage.ImageResources;
WorkingPathResource workingPathResource = null;
foreach (var imageResource in imageResources)
{
if (imageResource is WorkingPathResource)
{
workingPathResource = (WorkingPathResource)imageResource;
break;
}
}
BezierKnotRecord record = workingPathResource.Paths[3] as BezierKnotRecord;
if (record.Points[0].X != 2572506 || record.Points[0].Y != 8535408)
{
throw new Exception("Values is incorrect.");
}
// Ritaglia e salva.
psdImage.Crop(0, 500, 0, 200);
psdImage.Save(outputFile);
}
// Carica l'immagine salvata e controlla le modifiche.
using (var psdImage = (PsdImage)Image.Load(outputFile))
{
// Cerca la risorsa WorkingPathResource.
ResourceBlock[] imageResources = psdImage.ImageResources;
WorkingPathResource workingPathResource = null;
foreach (var imageResource in imageResources)
{
if (imageResource is WorkingPathResource)
{
workingPathResource = (WorkingPathResource)imageResource;
break;
}
}
BezierKnotRecord record = workingPathResource.Paths[3] as BezierKnotRecord;
if (record.Points[0].X != 4630510 || record.Points[0].Y != 22761088)
{
throw new Exception("Values is incorrect.");
}
}
Guarda anche
- interface IVectorPathData
- spazio dei nomi Aspose.PSD.FileFormats.Core.VectorPaths
- assemblea Aspose.PSD