←Select platform

MaximumComponent Field

Summary
Maximum value for the alpha, red, green, blue component.
Syntax
C#
C++/CLI
Java
Python
public static readonly byte MaximumComponent 
public static final int MAXIMUM_COMPONENT = 255; 
public: 
static readonly byte MaximumComponent 
MaximumComponent (RasterColor) 
Example
C#
Java
using Leadtools; 
 
 
public void FromRgbExample() 
{ 
	RasterColor[] colors = new RasterColor[RasterColor.MaximumComponent - RasterColor.MinimumComponent + 1]; 
	for (int i = RasterColor.MinimumComponent; i < RasterColor.MaximumComponent; i++) 
	{ 
		colors[i] = RasterColor.FromRgb(i); 
	} 
 
	for (int i = RasterColor.MinimumComponent; i < RasterColor.MaximumComponent; i++) 
	{ 
		Assert.IsTrue(colors[i].ToRgb() == i); 
	} 
} 
 
import java.io.File; 
import java.io.IOException; 
import java.util.Random; 
 
import org.junit.*; 
import org.junit.Test; 
import org.junit.runner.JUnitCore; 
import org.junit.runner.Result; 
import org.junit.runner.notification.Failure; 
import static org.junit.Assert.*; 
 
import leadtools.*; 
 
 
public void rasterColorFromRgbExample() { 
   RasterColor[] colors = new RasterColor[RasterColor.MAXIMUM_COMPONENT - RasterColor.MINIMUM_COMPONENT + 1]; 
   for (int i = RasterColor.MINIMUM_COMPONENT; i < RasterColor.MAXIMUM_COMPONENT; i++) { 
      colors[i] = RasterColor.fromRgb(i); 
   } 
 
   for (int i = RasterColor.MINIMUM_COMPONENT; i < RasterColor.MAXIMUM_COMPONENT; i++) { 
      assertTrue(colors[i].toRgb() == i); 
   } 
} 
Requirements

Target Platforms

Help Version 23.0.2024.5.22
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.