public PutValue ( string Name, object Value ) : void | ||
Name | string | Name of the property |
Value | object | Value of the property |
리턴 | void |
public static IRasterFunctionTemplate CreateWatermarkTemplate(string watermarkImagePath, double blendPercentage, esriWatermarkLocation watermarklocation) { #region Setup Raster Function Vars IRasterFunctionVariable watermarkRasterRFV = new RasterFunctionVariableClass(); watermarkRasterRFV.Name = "Raster"; watermarkRasterRFV.IsDataset = true; IRasterFunctionVariable watermarkImagePathRFV = new RasterFunctionVariableClass(); watermarkImagePathRFV.Name = "WatermarkImagePath"; watermarkImagePathRFV.Value = watermarkImagePath; watermarkImagePathRFV.IsDataset = false; IRasterFunctionVariable watermarkBlendPercRFV = new RasterFunctionVariableClass(); watermarkBlendPercRFV.Name = "BlendPercentage"; watermarkBlendPercRFV.Value = blendPercentage; IRasterFunctionVariable watermarkLocationRFV = new RasterFunctionVariableClass(); watermarkLocationRFV.Name = "Watermarklocation"; watermarkLocationRFV.Value = watermarklocation; #endregion #region Setup Raster Function Template // Create the Watermark Function Arguments object IRasterFunctionArguments rasterFunctionArguments = new CustomFunction.WatermarkFunctionArguments(); // Set the WatermarkImagePath rasterFunctionArguments.PutValue("WatermarkImagePath", watermarkImagePathRFV); // the blending percentage, rasterFunctionArguments.PutValue("BlendPercentage", watermarkBlendPercRFV); // and the watermark location. rasterFunctionArguments.PutValue("WatermarkLocation", watermarkLocationRFV); // Set the Raster Dataset as the input raster rasterFunctionArguments.PutValue("Raster", watermarkRasterRFV); IRasterFunction watermarkFunction = new CustomFunction.WatermarkFunction(); IRasterFunctionTemplate watermarkFunctionTemplate = new RasterFunctionTemplateClass(); watermarkFunctionTemplate.Function = watermarkFunction; watermarkFunctionTemplate.Arguments = rasterFunctionArguments; #endregion return(watermarkFunctionTemplate); }
public static IRasterFunctionTemplate CreateWatermarkTemplate(string watermarkImagePath, double blendPercentage, esriWatermarkLocation watermarklocation) { #region Setup Raster Function Vars IRasterFunctionVariable watermarkRasterRFV = new RasterFunctionVariableClass(); watermarkRasterRFV.Name = "Raster"; watermarkRasterRFV.IsDataset = true; IRasterFunctionVariable watermarkImagePathRFV = new RasterFunctionVariableClass(); watermarkImagePathRFV.Name = "WatermarkImagePath"; watermarkImagePathRFV.Value = watermarkImagePath; watermarkImagePathRFV.IsDataset = false; IRasterFunctionVariable watermarkBlendPercRFV = new RasterFunctionVariableClass(); watermarkBlendPercRFV.Name = "BlendPercentage"; watermarkBlendPercRFV.Value = blendPercentage; IRasterFunctionVariable watermarkLocationRFV = new RasterFunctionVariableClass(); watermarkLocationRFV.Name = "Watermarklocation"; watermarkLocationRFV.Value = watermarklocation; #endregion #region Setup Raster Function Template // Create the Watermark Function Arguments object IRasterFunctionArguments rasterFunctionArguments = new CustomFunction.WatermarkFunctionArguments(); // Set the WatermarkImagePath rasterFunctionArguments.PutValue("WatermarkImagePath", watermarkImagePathRFV); // the blending percentage, rasterFunctionArguments.PutValue("BlendPercentage", watermarkBlendPercRFV); // and the watermark location. rasterFunctionArguments.PutValue("WatermarkLocation", watermarkLocationRFV); // Set the Raster Dataset as the input raster rasterFunctionArguments.PutValue("Raster", watermarkRasterRFV); IRasterFunction watermarkFunction = new CustomFunction.WatermarkFunction(); IRasterFunctionTemplate watermarkFunctionTemplate = new RasterFunctionTemplateClass(); watermarkFunctionTemplate.Function = watermarkFunction; watermarkFunctionTemplate.Arguments = rasterFunctionArguments; #endregion return watermarkFunctionTemplate; }