mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-02 17:46:22 +03:00
0030969: Coding Rules - refactor Quantity_Color.cxx color table definition
The table of named colors has been compressed and moved out from Quantity_Color.cxx into Quantity_ColorTable.pxx. Quantity_NameOfColor - grayscale enumeration values have been re-ordered to fix discontinuity. Duplicating colors has been merged within enumeration: CHARTREUSE=CHARTREUSE1, GOLD=GOLD1, GREEN=GREEN1, ORANGE=ORANGE1, ORANGERED=ORANGERED1, RED=RED1, TOMATO=TOMATO1, YELLOW=YELLOW1. Added aliases to several other common colors: BLUE=BLUE1, CYAN=CYAN1, LIGHTCYAN=LIGHTCYAN1, MAGENTA=MAGENTA1. Quantity_Color class definition has been cleaned to follow OCCT coding style. Quantity_Color now stores NCollection_Vec3<float> as class field instead of separate components. Removed unused class Quantity_ColorDefinitionError. New methods Quantity_Color::Convert_LinearRGB_To_sRGB() and Quantity_Color::Convert_sRGB_To_LinearRGB() converting RGB components from linear to non-linear sRGB colorspace and vice versa. Image_PixMap::PixelColor() and Image_PixMap::SetPixelColor() methods have been extended with an optional argument for performing linearization/delinearization of 8-bit sRGB pixel formats. Draw Harness command AISColor has been corrected to take color name instead of enumeration index.
This commit is contained in:
parent
b008226203
commit
aaf8d6a98d
@ -276,7 +276,7 @@ blend result _model 2 _model_161
|
||||
# Show result
|
||||
pload VISUALIZATION
|
||||
vinit Driver1/Viewer1/View1
|
||||
vbackground -color 0.784314 0.784314 1
|
||||
vbackground -color C8C8FF
|
||||
vdisplay -dispMode 1 result
|
||||
vfit
|
||||
vaspects result -setFaceBoundaryDraw 1 -mostContinuity c2
|
||||
|
@ -262,7 +262,7 @@ unifysamedom result p_1
|
||||
# Show result
|
||||
pload VISUALIZATION
|
||||
vinit Driver1/Viewer1/View1
|
||||
vbackground -color 0.784314 0.784314 1
|
||||
vbackground -color C8C8FF
|
||||
vdisplay -dispMode 1 result
|
||||
vfit
|
||||
vaspects result -setFaceBoundaryDraw 1
|
||||
|
@ -68,18 +68,18 @@ vlight add directional direction 0 -10 0 head 1 color white
|
||||
vdisplay b1 b2 b3 b4 b5 b6 b7 b8 b9 b10
|
||||
|
||||
# set colors like in boxes of on OCC logo
|
||||
vsetcolor b1 0.8671875 0 0.16015625
|
||||
vsetcolor b2 0.96484375 0.8671875 0
|
||||
vsetcolor b3 0.609375 0.97734375 0.09375
|
||||
vsetcolor b4 0.90234375 0 0.48046875
|
||||
vsetcolor b5 0 0.48046875 0.73828125
|
||||
vsetcolor b6 0.578125 0 0.48046875
|
||||
vsetcolor b7 0.93359375 0.609375 0
|
||||
vsetcolor b8 0 0.70703125 0.9296875
|
||||
vsetcolor b9 0 0.64453125 0.48046875
|
||||
vsetcolor b10 0 0.48046875 0.73828125
|
||||
vsetcolor b1 DD0029
|
||||
vsetcolor b2 F6DD00
|
||||
vsetcolor b3 98F918
|
||||
vsetcolor b4 E9007A
|
||||
vsetcolor b5 007ABC
|
||||
vsetcolor b6 93007A
|
||||
vsetcolor b7 EE9800
|
||||
vsetcolor b8 00B489
|
||||
vsetcolor b9 00A47A
|
||||
vsetcolor b10 007ABC
|
||||
|
||||
# set material to plastic for better look
|
||||
for {set i 1} {$i <= 10} {incr i} {vsetmaterial b$i plastic}
|
||||
|
||||
vdrawtext label "Which\nbox\nis\ncloser\nto\nyou?" -pos 0 -6 -2 -color 0 0 0 -halign left -valign bottom -angle 0 -zoom 0 -height 40
|
||||
vdrawtext label "Which\nbox\nis\ncloser\nto\nyou?" -pos 0 -6 -2 -color BLACK -halign left -valign bottom -angle 0 -zoom 0 -height 40
|
||||
|
@ -255,27 +255,27 @@ if [info exists i7_show_3dview] {
|
||||
vlight add directional direction 1 -1 -2 head 1
|
||||
|
||||
vdisplay case
|
||||
vsetcolor case 0.7 0.7 0.7
|
||||
vsetcolor case GRAY70
|
||||
|
||||
vdisplay title
|
||||
vsetcolor title 0.1 0.1 0.1
|
||||
vsetcolor title GRAY10
|
||||
|
||||
# board is mostly yellow (edges, triangle markers)
|
||||
foreach f [explode board f] { vdisplay $f; vsetcolor $f 0.7 0.5 0.3 }
|
||||
foreach f [explode board f] { vdisplay $f; vsetcolor $f B3803D }
|
||||
# top and bottom faces are light-green (outside) and dark-green (inside)
|
||||
vsetcolor board_4 0 0.6 0.55
|
||||
vsetcolor board_5 0 0.6 0.55
|
||||
vsetcolor board_12 0 0.3 0.33
|
||||
vsetcolor board_14 0 0.3 0.33
|
||||
vsetcolor board_4 00998C
|
||||
vsetcolor board_5 00998C
|
||||
vsetcolor board_12 004D54
|
||||
vsetcolor board_14 004D54
|
||||
|
||||
vdisplay rpads
|
||||
vsetcolor rpads 0.7 0.6 0.4
|
||||
vsetcolor rpads B39966
|
||||
|
||||
vdisplay bpads
|
||||
vsetcolor bpads 0.7 0.6 0.4
|
||||
vsetcolor bpads B39966
|
||||
|
||||
vdisplay brpk
|
||||
vsetcolor brpk 0.5 0.4 0.3
|
||||
vsetcolor brpk 80664D
|
||||
|
||||
donly board case rpads brpk; fit
|
||||
}
|
||||
@ -287,17 +287,17 @@ pload OCAF XDE
|
||||
NewDocument D MDTV-XCAF
|
||||
|
||||
SetName D [XAddShape D board 0] "Board"
|
||||
foreach f [explode board f] { XSetColor D $f 0.7 0.5 0.3 }
|
||||
XSetColor D board_4 0 0.6 0.55
|
||||
XSetColor D board_5 0 0.6 0.55
|
||||
XSetColor D board_12 0 0.3 0.33
|
||||
XSetColor D board_14 0 0.3 0.33
|
||||
foreach f [explode board f] { XSetColor D $f B3803D }
|
||||
XSetColor D board_4 00998C
|
||||
XSetColor D board_5 00998C
|
||||
XSetColor D board_12 004D54
|
||||
XSetColor D board_14 004D54
|
||||
|
||||
SetName D [XAddShape D case 0] "Case"
|
||||
XSetColor D case 0.7 0.7 0.7
|
||||
XSetColor D case GRAY70
|
||||
|
||||
SetName D [XAddShape D title 0] "Case title"
|
||||
XSetColor D title 0.1 0.1 0.1
|
||||
XSetColor D title GRAY10
|
||||
|
||||
SetName D [XAddShape D rpads 1] "Top side contact pads"
|
||||
SetName D [XAddShape D bpads 1] "Bottom contact pads"
|
||||
@ -306,17 +306,17 @@ SetName D [XFindShape D rpad] "Round pad"
|
||||
SetName D [XFindShape D Rpad] "Big round pad"
|
||||
SetName D [XFindShape D spad_1] "Square pad 1"
|
||||
SetName D [XFindShape D spad_2] "Square pad 2"
|
||||
XSetColor D rpad 0.7 0.6 0.4
|
||||
XSetColor D Rpad 0.7 0.6 0.4
|
||||
XSetColor D bpad 0.7 0.6 0.4
|
||||
XSetColor D spad_1 0.7 0.6 0.4
|
||||
XSetColor D spad_2 0.7 0.6 0.4
|
||||
XSetColor D rpad B39966
|
||||
XSetColor D Rpad B39966
|
||||
XSetColor D bpad B39966
|
||||
XSetColor D spad_1 B39966
|
||||
XSetColor D spad_2 B39966
|
||||
|
||||
SetName D [XAddShape D brpk 1] "Bottom packages"
|
||||
SetName D [XFindShape D rpk] "Bottom package"
|
||||
XSetColor D rpk1 0.7 0.7 0.7
|
||||
XSetColor D rpk2 0.5 0.4 0.3
|
||||
XSetColor D rpk3 0.7 0.7 0.7
|
||||
XSetColor D rpk1 GRAY70
|
||||
XSetColor D rpk2 80664D
|
||||
XSetColor D rpk3 GRAY70
|
||||
|
||||
XShow D
|
||||
vlight clear
|
||||
|
@ -36,9 +36,7 @@ set anArrAngle [expr 3.14 * 12.0 / 180.0]
|
||||
|
||||
# Form dimension names list to set parameters with vdimparam command
|
||||
set aList {rd_1 rd_2 ad_1 ad_2 ad_3}
|
||||
for {set i 1} {$i <= 10} {incr i} {
|
||||
lappend aList ld_$i
|
||||
}
|
||||
for {set i 1} {$i <= 10} {incr i} { lappend aList ld_$i }
|
||||
|
||||
puts "Creating dimensions..."
|
||||
vdimension ld_1 -length -shapes bs_27 -plane xoy -color black -flyout -15
|
||||
@ -67,29 +65,14 @@ foreach i $aList {
|
||||
vfit
|
||||
|
||||
puts "Displaying exported shapes..."
|
||||
vdisplay a b
|
||||
vsetdispmode a 1
|
||||
vsetdispmode b 1
|
||||
vdisplay -dispMode 1 a b
|
||||
vaspects a -setmaterial steel
|
||||
vaspects b -setmaterial bronze
|
||||
|
||||
puts "Clipping shapes for better view..."
|
||||
vclipplane create pa
|
||||
vclipplane change pa equation 0 0 1 0
|
||||
vclipplane change pa capping on
|
||||
vclipplane change pa capping color 0.9 0.9 0.9
|
||||
vclipplane set pa object a
|
||||
|
||||
vclipplane create pb
|
||||
vclipplane change pb equation 0 0 1 0
|
||||
vclipplane change pb capping on
|
||||
vclipplane change pb capping color 1.0 0.8 0.0
|
||||
vclipplane set pb object b
|
||||
|
||||
vclipplane change pa capping texname $aHatch
|
||||
vclipplane change pa capping texscale 0.05 -0.05
|
||||
vclipplane change pb capping texname $aHatch
|
||||
vclipplane change pb capping texscale 0.05 0.05
|
||||
vclipplane pa -set a -equation 0 0 1 0 -capping on -color GRAY90 -texName $aHatch -texScale 0.05 -0.05
|
||||
vclipplane pb -set b -equation 0 0 1 0 -capping on -color GOLD -texName $aHatch -texScale 0.05 -0.05
|
||||
|
||||
vbottom
|
||||
vrotate -0.3 -0.3 0
|
||||
|
@ -77,14 +77,13 @@ SetName D $main "OCC Logo 2019"
|
||||
SetName D [XFindShape D sb] "Core"
|
||||
SetName D [XFindShape D tp] "Loop"
|
||||
SetName D [XFindShape D rs] "Connector"
|
||||
XSetColor D sb 1 0.21 0.32
|
||||
XSetColor D tp 0 0.667 0.855
|
||||
XSetColor D rs 0 0.45 0.69
|
||||
XSetColor D sb FF3652
|
||||
XSetColor D tp 00AADA
|
||||
XSetColor D rs 0073B0
|
||||
|
||||
# display
|
||||
vinit
|
||||
vsetcolorbg 1 1 1
|
||||
vsetdispmode 1
|
||||
XDisplay D
|
||||
vinit View1
|
||||
vbackground -color WHITE
|
||||
XDisplay -dispMode 1 D
|
||||
vtop
|
||||
vfit
|
||||
|
@ -56,7 +56,7 @@ for { set aMarkerType 0 } { $aMarkerType <= 13 } { incr aMarkerType } {
|
||||
set aRow [expr $aMarkerType - 7]
|
||||
set aCol 5
|
||||
set aName [lindex $aMarkerTypeNames $aMarkerType]
|
||||
vdrawtext "$aName" "$aName" -pos 0 [expr $aRow + 0.5] 0 -color 0.5 1.0 1.0 -halign center -valign center -angle 000 -zoom 0 -height 12 -aspect bold -font $aLabelFont -noupdate
|
||||
vdrawtext "$aName" "$aName" -pos 0 [expr $aRow + 0.5] 0 -color 7FFFFF -halign center -valign center -angle 000 -zoom 0 -height 12 -aspect bold -font $aLabelFont -noupdate
|
||||
vdisplay -top -noupdate "$aName"
|
||||
if { $aMarkerType == 13 } {
|
||||
vmarkerstest m${aMarkerType}_${aCol} $aCol $aRow 0 PointsOnSide=1 FileName=$aCustom1
|
||||
|
@ -4,36 +4,22 @@
|
||||
#Title: Material properties in viewer
|
||||
|
||||
set THE_MATERIALS {brass bronze copper gold jade neon_phc pewter obsidian plaster plastic satin silver steel stone chrome aluminium water glass diamond charcoal}
|
||||
set THE_COLORS {default red green blue1}
|
||||
set THE_COLORS {default red green blue}
|
||||
set THE_ROW_DIST 35
|
||||
|
||||
proc drawLabels {} {
|
||||
set x 20
|
||||
set y 15
|
||||
set r 0.098
|
||||
set g 0.098
|
||||
set b 0.098
|
||||
foreach aMatIter $::THE_MATERIALS {
|
||||
vdrawtext "$aMatIter" "$aMatIter" -pos $x $y 0 -color $r $g $b -halign right -valign center -angle 000 -zoom 0 -height 14 -aspect regular -font Arial
|
||||
vdrawtext "$aMatIter" "$aMatIter" -pos $x $y 0 -color GRAY10 -halign right -valign center -angle 000 -zoom 0 -height 14 -aspect regular -font Arial
|
||||
incr y 10
|
||||
}
|
||||
set x 40
|
||||
set y 5
|
||||
foreach aColIter $::THE_COLORS {
|
||||
if { $aColIter == "red" } {
|
||||
set r 1.0
|
||||
set g 0.0
|
||||
set b 0
|
||||
} elseif { $aColIter == "green" } {
|
||||
set r 0.0
|
||||
set g 1.0
|
||||
set b 0.0
|
||||
} elseif { $aColIter == "blue1" } {
|
||||
set r 0.0
|
||||
set g 0.0
|
||||
set b 1.0
|
||||
}
|
||||
vdrawtext "$aColIter" "$aColIter" -pos $x $y 0 -color $r $g $b -halign center -valign center -angle 000 -zoom 0 -height 14 -aspect regular -font Arial
|
||||
set aLabColor "$aColIter"
|
||||
if { "$aColIter" == "default" } { set aLabColor BLACK }
|
||||
vdrawtext "$aColIter" "$aColIter" -pos $x $y 0 -color "$aLabColor" -halign center -valign center -angle 000 -zoom 0 -height 14 -aspect regular -font Arial
|
||||
incr x $::THE_ROW_DIST
|
||||
}
|
||||
}
|
||||
@ -69,7 +55,7 @@ vclose ALL
|
||||
vinit View1 w=768 h=768
|
||||
vtop
|
||||
vglinfo
|
||||
vbackground -gradient 0.705882 0.784314 1 0.705882 0.705882 0.705882 -gradientMode VERTICAL
|
||||
vbackground -gradient B4C8FF B4B4B4 -gradientMode VERTICAL
|
||||
|
||||
vlight -change 0 -dir 0.577 -0.577 -0.577
|
||||
vrenderparams -msaa 8
|
||||
|
@ -46,18 +46,17 @@ NewDocument D
|
||||
XAddShape D body_1
|
||||
XAddShape D core_1
|
||||
|
||||
#XSetColor D body_1 0. 0. 1.
|
||||
for {set i 1} {$i <= 26} {incr i} {XSetColor D body_1_$i 0. 0. 1.}
|
||||
XSetColor D body_1_1 0.9 0.5 0.4
|
||||
XSetColor D body_1_9 0.9 0.5 0.4
|
||||
for {set i 10} {$i <= 22} {incr i} {XSetColor D body_1_$i 0.6 0.7 0.0}
|
||||
XSetColor D core_1 0.1 0.1 1.
|
||||
foreach ff [explode core_1 f] { XSetColor D $ff 0.1 0.1 1. ; puts "set color $ff" }
|
||||
|
||||
XShow D
|
||||
for {set i 1} {$i <= 26} {incr i} {XSetColor D body_1_$i BLUE}
|
||||
XSetColor D body_1_1 E68066
|
||||
XSetColor D body_1_9 E68066
|
||||
for {set i 10} {$i <= 22} {incr i} {XSetColor D body_1_$i 99B300}
|
||||
XSetColor D core_1 1A1AFF
|
||||
foreach ff [explode core_1 f] { XSetColor D $ff 1A1AFF ; puts "set color $ff" }
|
||||
|
||||
vclear
|
||||
vinit View1
|
||||
XDisplay -dispMode 1 D -explore
|
||||
vfit
|
||||
vsetdispmode 1
|
||||
vrenderparams -msaa 8
|
||||
vbackground -color WHITE
|
||||
|
||||
|
@ -28,19 +28,20 @@ SetName D [XFindShape D link]:2 "Nut instance 1"
|
||||
SetName D [XFindShape D link]:3 "Nut instance 2"
|
||||
|
||||
puts "- Pin will be white"
|
||||
XSetColor D [XFindShape D pin] 1 1 1
|
||||
XSetColor D [XFindShape D pin] WHITE
|
||||
puts "- Nut itself will be dark gray"
|
||||
XSetColor D [XFindShape D nut] 0.1 0.1 0.1
|
||||
XSetColor D [XFindShape D nut] GRAY10
|
||||
puts "- Nut instance #1 will be red"
|
||||
XSetColor D [XFindShape D link]:2 1 0 0
|
||||
XSetColor D [XFindShape D link]:2 RED
|
||||
puts "- Nut instance #2 will be green"
|
||||
XSetColor D [XFindShape D link]:3 0 1 0
|
||||
XSetColor D [XFindShape D link]:3 GREEN
|
||||
|
||||
puts "Starting DF browser..."
|
||||
DFBrowse D
|
||||
puts "Expand the document tree to see its structure and assigned names"
|
||||
|
||||
puts "Showing assembly in 3d view..."
|
||||
XShow D
|
||||
vclear
|
||||
vinit View1
|
||||
XDisplay -dispMode 1 D -explore
|
||||
vfit
|
||||
vsetdispmode 1
|
||||
|
@ -367,35 +367,57 @@ static Standard_Integer DPrsStd_AISColor (Draw_Interpretor& di,
|
||||
Standard_Integer nb,
|
||||
const char** arg)
|
||||
{
|
||||
if (nb >= 3) {
|
||||
Handle(TDocStd_Document) D;
|
||||
if (!DDocStd::GetDocument(arg[1],D)) return 1;
|
||||
TDF_Label L;
|
||||
if (!DDF::FindLabel(D->GetData(),arg[2],L)) return 1;
|
||||
|
||||
Handle(TPrsStd_AISViewer) viewer;
|
||||
if( !TPrsStd_AISViewer::Find(L, viewer) ) return 1;
|
||||
|
||||
Handle(TPrsStd_AISPresentation) prs;
|
||||
if(L.FindAttribute( TPrsStd_AISPresentation::GetID(), prs) ) {
|
||||
if( nb == 4 ) {
|
||||
prs->SetColor((Quantity_NameOfColor)Draw::Atoi(arg[3]));
|
||||
TPrsStd_AISViewer::Update(L);
|
||||
}
|
||||
else
|
||||
if (prs->HasOwnColor()){
|
||||
di << "Color = " << prs->Color() << "\n";
|
||||
di<<prs->Color();
|
||||
}
|
||||
else{
|
||||
di << "DPrsStd_AISColor: Warning : Color wasn't set\n";
|
||||
di<<(-1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
if (nb != 3 && nb != 4)
|
||||
{
|
||||
std::cout << "Syntax error: wrong number of arguments\n";
|
||||
return 1;
|
||||
}
|
||||
di << "DPrsStd_AISColor : Error" << "\n";
|
||||
return 1;
|
||||
|
||||
Handle(TDocStd_Document) D;
|
||||
if (!DDocStd::GetDocument (arg[1], D))
|
||||
{
|
||||
std::cout << "Syntax error: '" << arg[1] << "' is not a document\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
TDF_Label L;
|
||||
if (!DDF::FindLabel (D->GetData(), arg[2], L))
|
||||
{
|
||||
std::cout << "Syntax error: '" << arg[2] << "' label cannot be found in the document\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
Handle(TPrsStd_AISViewer) viewer;
|
||||
Handle(TPrsStd_AISPresentation) prs;
|
||||
if (!TPrsStd_AISViewer::Find (L, viewer)
|
||||
||!L.FindAttribute (TPrsStd_AISPresentation::GetID(), prs))
|
||||
{
|
||||
std::cout << "Syntax error: '" << arg[2] << "' label has no presentation\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (nb == 4)
|
||||
{
|
||||
Quantity_NameOfColor aColor = Quantity_NOC_BLACK;
|
||||
if (!Quantity_Color::ColorFromName (arg[3], aColor))
|
||||
{
|
||||
std::cout << "Syntax error: unknown color '" << arg[3] << "'\n";
|
||||
return 1;
|
||||
}
|
||||
prs->SetColor (aColor);
|
||||
TPrsStd_AISViewer::Update (L);
|
||||
}
|
||||
else if (prs->HasOwnColor())
|
||||
{
|
||||
di << "Color = " << Quantity_Color::StringName (prs->Color()) << "\n";
|
||||
di << Quantity_Color::StringName (prs->Color());
|
||||
}
|
||||
else
|
||||
{
|
||||
di << "DPrsStd_AISColor: Warning : Color wasn't set\n";
|
||||
di << (-1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@ -192,7 +192,8 @@ void Image_PixMap::Clear()
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
Quantity_ColorRGBA Image_PixMap::PixelColor (const Standard_Integer theX,
|
||||
const Standard_Integer theY) const
|
||||
const Standard_Integer theY,
|
||||
const Standard_Boolean theToLinearize) const
|
||||
{
|
||||
if (IsEmpty()
|
||||
|| theX < 0 || (Standard_Size )theX >= SizeX()
|
||||
@ -236,32 +237,58 @@ Quantity_ColorRGBA Image_PixMap::PixelColor (const Standard_Integer theX,
|
||||
case Image_Format_RGBA:
|
||||
{
|
||||
const Image_ColorRGBA& aPixel = Value<Image_ColorRGBA> (theY, theX);
|
||||
return Quantity_ColorRGBA (float(aPixel.r()) / 255.0f, float(aPixel.g()) / 255.0f, float(aPixel.b()) / 255.0f, float(aPixel.a()) / 255.0f);
|
||||
return theToLinearize
|
||||
? Quantity_ColorRGBA (Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.r()) / 255.0f),
|
||||
Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.g()) / 255.0f),
|
||||
Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.b()) / 255.0f),
|
||||
float(aPixel.a()) / 255.0f)
|
||||
: Quantity_ColorRGBA (float(aPixel.r()) / 255.0f, float(aPixel.g()) / 255.0f, float(aPixel.b()) / 255.0f, float(aPixel.a()) / 255.0f);
|
||||
}
|
||||
case Image_Format_BGRA:
|
||||
{
|
||||
const Image_ColorBGRA& aPixel = Value<Image_ColorBGRA> (theY, theX);
|
||||
return Quantity_ColorRGBA (float(aPixel.r()) / 255.0f, float(aPixel.g()) / 255.0f, float(aPixel.b()) / 255.0f, float(aPixel.a()) / 255.0f);
|
||||
return theToLinearize
|
||||
? Quantity_ColorRGBA (Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.r()) / 255.0f),
|
||||
Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.g()) / 255.0f),
|
||||
Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.b()) / 255.0f),
|
||||
float(aPixel.a()) / 255.0f)
|
||||
: Quantity_ColorRGBA (float(aPixel.r()) / 255.0f, float(aPixel.g()) / 255.0f, float(aPixel.b()) / 255.0f, float(aPixel.a()) / 255.0f);
|
||||
}
|
||||
case Image_Format_RGB32:
|
||||
{
|
||||
const Image_ColorRGB32& aPixel = Value<Image_ColorRGB32> (theY, theX);
|
||||
return Quantity_ColorRGBA (float(aPixel.r()) / 255.0f, float(aPixel.g()) / 255.0f, float(aPixel.b()) / 255.0f, 1.0f); // opaque
|
||||
return theToLinearize
|
||||
? Quantity_ColorRGBA (Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.r()) / 255.0f),
|
||||
Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.g()) / 255.0f),
|
||||
Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.b()) / 255.0f), 1.0f)
|
||||
: Quantity_ColorRGBA (float(aPixel.r()) / 255.0f, float(aPixel.g()) / 255.0f, float(aPixel.b()) / 255.0f, 1.0f);
|
||||
}
|
||||
case Image_Format_BGR32:
|
||||
{
|
||||
const Image_ColorBGR32& aPixel = Value<Image_ColorBGR32> (theY, theX);
|
||||
return Quantity_ColorRGBA (float(aPixel.r()) / 255.0f, float(aPixel.g()) / 255.0f, float(aPixel.b()) / 255.0f, 1.0f); // opaque
|
||||
return theToLinearize
|
||||
? Quantity_ColorRGBA (Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.r()) / 255.0f),
|
||||
Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.g()) / 255.0f),
|
||||
Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.b()) / 255.0f), 1.0f)
|
||||
: Quantity_ColorRGBA (float(aPixel.r()) / 255.0f, float(aPixel.g()) / 255.0f, float(aPixel.b()) / 255.0f, 1.0f);
|
||||
}
|
||||
case Image_Format_RGB:
|
||||
{
|
||||
const Image_ColorRGB& aPixel = Value<Image_ColorRGB> (theY, theX);
|
||||
return Quantity_ColorRGBA (float(aPixel.r()) / 255.0f, float(aPixel.g()) / 255.0f, float(aPixel.b()) / 255.0f, 1.0f); // opaque
|
||||
return theToLinearize
|
||||
? Quantity_ColorRGBA (Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.r()) / 255.0f),
|
||||
Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.g()) / 255.0f),
|
||||
Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.b()) / 255.0f), 1.0f)
|
||||
: Quantity_ColorRGBA (float(aPixel.r()) / 255.0f, float(aPixel.g()) / 255.0f, float(aPixel.b()) / 255.0f, 1.0f);
|
||||
}
|
||||
case Image_Format_BGR:
|
||||
{
|
||||
const Image_ColorBGR& aPixel = Value<Image_ColorBGR> (theY, theX);
|
||||
return Quantity_ColorRGBA (float(aPixel.r()) / 255.0f, float(aPixel.g()) / 255.0f, float(aPixel.b()) / 255.0f, 1.0f); // opaque
|
||||
return theToLinearize
|
||||
? Quantity_ColorRGBA (Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.r()) / 255.0f),
|
||||
Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.g()) / 255.0f),
|
||||
Quantity_Color::Convert_sRGB_To_LinearRGB (float(aPixel.b()) / 255.0f), 1.0f)
|
||||
: Quantity_ColorRGBA (float(aPixel.r()) / 255.0f, float(aPixel.g()) / 255.0f, float(aPixel.b()) / 255.0f, 1.0f);
|
||||
}
|
||||
case Image_Format_Gray:
|
||||
{
|
||||
@ -289,7 +316,8 @@ Quantity_ColorRGBA Image_PixMap::PixelColor (const Standard_Integer theX,
|
||||
// =======================================================================
|
||||
void Image_PixMap::SetPixelColor (const Standard_Integer theX,
|
||||
const Standard_Integer theY,
|
||||
const Quantity_ColorRGBA& theColor)
|
||||
const Quantity_ColorRGBA& theColor,
|
||||
const Standard_Boolean theToDeLinearize)
|
||||
{
|
||||
if (IsEmpty()
|
||||
|| theX < 0 || Standard_Size(theX) >= SizeX()
|
||||
@ -348,53 +376,107 @@ void Image_PixMap::SetPixelColor (const Standard_Integer theX,
|
||||
case Image_Format_RGBA:
|
||||
{
|
||||
Image_ColorRGBA& aPixel = ChangeValue<Image_ColorRGBA> (theY, theX);
|
||||
aPixel.r() = Standard_Byte(aColor.r() * 255.0f);
|
||||
aPixel.g() = Standard_Byte(aColor.g() * 255.0f);
|
||||
aPixel.b() = Standard_Byte(aColor.b() * 255.0f);
|
||||
if (theToDeLinearize)
|
||||
{
|
||||
aPixel.r() = Standard_Byte(Quantity_Color::Convert_LinearRGB_To_sRGB (aColor.r()) * 255.0f);
|
||||
aPixel.g() = Standard_Byte(Quantity_Color::Convert_LinearRGB_To_sRGB (aColor.g()) * 255.0f);
|
||||
aPixel.b() = Standard_Byte(Quantity_Color::Convert_LinearRGB_To_sRGB (aColor.b()) * 255.0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
aPixel.r() = Standard_Byte(aColor.r() * 255.0f);
|
||||
aPixel.g() = Standard_Byte(aColor.g() * 255.0f);
|
||||
aPixel.b() = Standard_Byte(aColor.b() * 255.0f);
|
||||
}
|
||||
aPixel.a() = Standard_Byte(aColor.a() * 255.0f);
|
||||
return;
|
||||
}
|
||||
case Image_Format_BGRA:
|
||||
{
|
||||
Image_ColorBGRA& aPixel = ChangeValue<Image_ColorBGRA> (theY, theX);
|
||||
aPixel.r() = Standard_Byte(aColor.r() * 255.0f);
|
||||
aPixel.g() = Standard_Byte(aColor.g() * 255.0f);
|
||||
aPixel.b() = Standard_Byte(aColor.b() * 255.0f);
|
||||
if (theToDeLinearize)
|
||||
{
|
||||
aPixel.r() = Standard_Byte(Quantity_Color::Convert_LinearRGB_To_sRGB (aColor.r()) * 255.0f);
|
||||
aPixel.g() = Standard_Byte(Quantity_Color::Convert_LinearRGB_To_sRGB (aColor.g()) * 255.0f);
|
||||
aPixel.b() = Standard_Byte(Quantity_Color::Convert_LinearRGB_To_sRGB (aColor.b()) * 255.0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
aPixel.r() = Standard_Byte(aColor.r() * 255.0f);
|
||||
aPixel.g() = Standard_Byte(aColor.g() * 255.0f);
|
||||
aPixel.b() = Standard_Byte(aColor.b() * 255.0f);
|
||||
}
|
||||
aPixel.a() = Standard_Byte(aColor.a() * 255.0f);
|
||||
return;
|
||||
}
|
||||
case Image_Format_RGB32:
|
||||
{
|
||||
Image_ColorRGB32& aPixel = ChangeValue<Image_ColorRGB32> (theY, theX);
|
||||
aPixel.r() = Standard_Byte(aColor.r() * 255.0f);
|
||||
aPixel.g() = Standard_Byte(aColor.g() * 255.0f);
|
||||
aPixel.b() = Standard_Byte(aColor.b() * 255.0f);
|
||||
if (theToDeLinearize)
|
||||
{
|
||||
aPixel.r() = Standard_Byte(Quantity_Color::Convert_LinearRGB_To_sRGB (aColor.r()) * 255.0f);
|
||||
aPixel.g() = Standard_Byte(Quantity_Color::Convert_LinearRGB_To_sRGB (aColor.g()) * 255.0f);
|
||||
aPixel.b() = Standard_Byte(Quantity_Color::Convert_LinearRGB_To_sRGB (aColor.b()) * 255.0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
aPixel.r() = Standard_Byte(aColor.r() * 255.0f);
|
||||
aPixel.g() = Standard_Byte(aColor.g() * 255.0f);
|
||||
aPixel.b() = Standard_Byte(aColor.b() * 255.0f);
|
||||
}
|
||||
aPixel.a_() = 255;
|
||||
return;
|
||||
}
|
||||
case Image_Format_BGR32:
|
||||
{
|
||||
Image_ColorBGR32& aPixel = ChangeValue<Image_ColorBGR32> (theY, theX);
|
||||
aPixel.r() = Standard_Byte(aColor.r() * 255.0f);
|
||||
aPixel.g() = Standard_Byte(aColor.g() * 255.0f);
|
||||
aPixel.b() = Standard_Byte(aColor.b() * 255.0f);
|
||||
if (theToDeLinearize)
|
||||
{
|
||||
aPixel.r() = Standard_Byte(Quantity_Color::Convert_LinearRGB_To_sRGB (aColor.r()) * 255.0f);
|
||||
aPixel.g() = Standard_Byte(Quantity_Color::Convert_LinearRGB_To_sRGB (aColor.g()) * 255.0f);
|
||||
aPixel.b() = Standard_Byte(Quantity_Color::Convert_LinearRGB_To_sRGB (aColor.b()) * 255.0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
aPixel.r() = Standard_Byte(aColor.r() * 255.0f);
|
||||
aPixel.g() = Standard_Byte(aColor.g() * 255.0f);
|
||||
aPixel.b() = Standard_Byte(aColor.b() * 255.0f);
|
||||
}
|
||||
aPixel.a_() = 255;
|
||||
return;
|
||||
}
|
||||
case Image_Format_RGB:
|
||||
{
|
||||
Image_ColorRGB& aPixel = ChangeValue<Image_ColorRGB> (theY, theX);
|
||||
aPixel.r() = Standard_Byte(aColor.r() * 255.0f);
|
||||
aPixel.g() = Standard_Byte(aColor.g() * 255.0f);
|
||||
aPixel.b() = Standard_Byte(aColor.b() * 255.0f);
|
||||
if (theToDeLinearize)
|
||||
{
|
||||
aPixel.r() = Standard_Byte(Quantity_Color::Convert_LinearRGB_To_sRGB (aColor.r()) * 255.0f);
|
||||
aPixel.g() = Standard_Byte(Quantity_Color::Convert_LinearRGB_To_sRGB (aColor.g()) * 255.0f);
|
||||
aPixel.b() = Standard_Byte(Quantity_Color::Convert_LinearRGB_To_sRGB (aColor.b()) * 255.0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
aPixel.r() = Standard_Byte(aColor.r() * 255.0f);
|
||||
aPixel.g() = Standard_Byte(aColor.g() * 255.0f);
|
||||
aPixel.b() = Standard_Byte(aColor.b() * 255.0f);
|
||||
}
|
||||
return;
|
||||
}
|
||||
case Image_Format_BGR:
|
||||
{
|
||||
Image_ColorBGR& aPixel = ChangeValue<Image_ColorBGR> (theY, theX);
|
||||
aPixel.r() = Standard_Byte(aColor.r() * 255.0f);
|
||||
aPixel.g() = Standard_Byte(aColor.g() * 255.0f);
|
||||
aPixel.b() = Standard_Byte(aColor.b() * 255.0f);
|
||||
if (theToDeLinearize)
|
||||
{
|
||||
aPixel.r() = Standard_Byte(Quantity_Color::Convert_LinearRGB_To_sRGB (aColor.r()) * 255.0f);
|
||||
aPixel.g() = Standard_Byte(Quantity_Color::Convert_LinearRGB_To_sRGB (aColor.g()) * 255.0f);
|
||||
aPixel.b() = Standard_Byte(Quantity_Color::Convert_LinearRGB_To_sRGB (aColor.b()) * 255.0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
aPixel.r() = Standard_Byte(aColor.r() * 255.0f);
|
||||
aPixel.g() = Standard_Byte(aColor.g() * 255.0f);
|
||||
aPixel.b() = Standard_Byte(aColor.b() * 255.0f);
|
||||
}
|
||||
return;
|
||||
}
|
||||
case Image_Format_Gray:
|
||||
|
@ -102,26 +102,38 @@ public: // high-level API
|
||||
|
||||
//! Returns the pixel color. This function is relatively slow.
|
||||
//! Beware that this method takes coordinates in opposite order in contrast to ::Value() and ::ChangeValue().
|
||||
//! @param theX column index from left
|
||||
//! @param theY row index from top
|
||||
//! @param theX [in] column index from left
|
||||
//! @param theY [in] row index from top
|
||||
//! @param theToLinearize [in] when TRUE, the color stored in non-linear color space (e.g. Image_Format_RGB) will be linearized
|
||||
//! @return the pixel color
|
||||
Standard_EXPORT Quantity_ColorRGBA PixelColor (const Standard_Integer theX,
|
||||
const Standard_Integer theY) const;
|
||||
const Standard_Integer theY,
|
||||
const Standard_Boolean theToLinearize = Standard_False) const;
|
||||
|
||||
//! Sets the pixel color. This function is relatively slow.
|
||||
//! Beware that this method takes coordinates in opposite order in contrast to ::Value() and ::ChangeValue().
|
||||
//! @param theX [in] column index from left
|
||||
//! @param theY [in] row index from top
|
||||
//! @param theColor [in] color to store
|
||||
//! @param theToDeLinearize [in] when TRUE, the gamma correction will be applied for storing in non-linear color space (e.g. Image_Format_RGB)
|
||||
void SetPixelColor (const Standard_Integer theX,
|
||||
const Standard_Integer theY,
|
||||
const Quantity_Color& theColor)
|
||||
const Quantity_Color& theColor,
|
||||
const Standard_Boolean theToDeLinearize = Standard_False)
|
||||
{
|
||||
SetPixelColor (theX, theY, Quantity_ColorRGBA (theColor, 1.0f));
|
||||
SetPixelColor (theX, theY, Quantity_ColorRGBA (theColor, 1.0f), theToDeLinearize);
|
||||
}
|
||||
|
||||
//! Sets the pixel color. This function is relatively slow.
|
||||
//! Beware that this method takes coordinates in opposite order in contrast to ::Value() and ::ChangeValue().
|
||||
//! @param theX [in] column index from left
|
||||
//! @param theY [in] row index from top
|
||||
//! @param theColor [in] color to store
|
||||
//! @param theToDeLinearize [in] when TRUE, the gamma correction will be applied for storing in non-linear color space (e.g. Image_Format_RGB)
|
||||
Standard_EXPORT void SetPixelColor (const Standard_Integer theX,
|
||||
const Standard_Integer theY,
|
||||
const Quantity_ColorRGBA& theColor);
|
||||
const Quantity_ColorRGBA& theColor,
|
||||
const Standard_Boolean theToDeLinearize = Standard_False);
|
||||
|
||||
//! Initialize image plane as wrapper over alien data.
|
||||
//! Data will not be copied! Notice that caller should ensure
|
||||
|
@ -1741,39 +1741,6 @@ static Standard_Integer OCC1029_AISTransparency (Draw_Interpretor& di,
|
||||
return 1;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : OCC1030_AISColor
|
||||
//purpose : OCC1030_AISColor (DOC,entry,[color])
|
||||
//=======================================================================
|
||||
|
||||
static Standard_Integer OCC1030_AISColor (Draw_Interpretor& di,
|
||||
Standard_Integer nb,
|
||||
const char ** arg)
|
||||
{
|
||||
if (nb >= 3) {
|
||||
Handle(TDocStd_Document) D;
|
||||
if (!DDocStd::GetDocument(arg[1],D)) return 1;
|
||||
TDF_Label L;
|
||||
if (!DDF::FindLabel(D->GetData(),arg[2],L)) return 1;
|
||||
|
||||
Handle(TPrsStd_AISViewer) viewer;
|
||||
if( !TPrsStd_AISViewer::Find(L, viewer) ) return 1;
|
||||
|
||||
Handle(TPrsStd_AISPresentation) prs;
|
||||
if(L.FindAttribute( TPrsStd_AISPresentation::GetID(), prs) ) {
|
||||
if( nb == 4 ) {
|
||||
prs->SetColor((Quantity_NameOfColor)Draw::Atoi(arg[3]));
|
||||
TPrsStd_AISViewer::Update(L);
|
||||
}
|
||||
else
|
||||
di << "Color = " << prs->Color() << "\n";
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
di << arg[0] << " : Error\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : OCC1031_AISMaterial
|
||||
//purpose : OCC1031_AISMaterial (DOC,entry,[material])
|
||||
@ -4866,7 +4833,6 @@ void QABugs::Commands_11(Draw_Interpretor& theCommands) {
|
||||
theCommands.Add("OCC902", "OCC902 expression", __FILE__, OCC902, group);
|
||||
|
||||
theCommands.Add ("OCC1029_AISTransparency","OCC1029_AISTransparency (DOC, entry, [real])",__FILE__, OCC1029_AISTransparency, group);
|
||||
theCommands.Add ("OCC1030_AISColor", "OCC1030_AISColor (DOC, entry, [color])", __FILE__, OCC1030_AISColor, group);
|
||||
theCommands.Add ("OCC1031_AISMaterial", "OCC1031_AISMaterial (DOC, entry, [material])", __FILE__, OCC1031_AISMaterial, group);
|
||||
theCommands.Add ("OCC1032_AISWidth", "OCC1032_AISWidth (DOC, entry, [width])", __FILE__, OCC1032_AISWidth, group);
|
||||
theCommands.Add ("OCC1033_AISMode", "OCC1033_AISMode (DOC, entry, [mode])", __FILE__, OCC1033_AISMode, group);
|
||||
|
@ -13,11 +13,11 @@ Quantity_Coefficient.hxx
|
||||
Quantity_CoefficientOfExpansion.hxx
|
||||
Quantity_Color.cxx
|
||||
Quantity_Color.hxx
|
||||
Quantity_ColorTable.pxx
|
||||
Quantity_ColorHasher.hxx
|
||||
Quantity_ColorRGBA.cxx
|
||||
Quantity_ColorRGBA.hxx
|
||||
Quantity_ColorRGBAHasher.hxx
|
||||
Quantity_ColorDefinitionError.hxx
|
||||
Quantity_Concentration.hxx
|
||||
Quantity_Conductivity.hxx
|
||||
Quantity_Constant.hxx
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -25,46 +25,22 @@
|
||||
#include <Quantity_TypeOfColor.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <NCollection_Vec4.hxx>
|
||||
class Quantity_ColorDefinitionError;
|
||||
|
||||
|
||||
//! This class allows the definition of a colour.
|
||||
//! The names of the colours are from the X11 specification.
|
||||
//! color object may be used for numerous applicative purposes.
|
||||
//! A color is defined by:
|
||||
//! - its respective quantities of red, green and blue (R-G-B values), or
|
||||
//! - its hue angle and its values of lightness and saturation (H-L-S values).
|
||||
//! These two color definition systems are equivalent.
|
||||
//! Use this class in conjunction with:
|
||||
//! - the Quantity_TypeOfColor enumeration
|
||||
//! which identifies the color definition system you are using,
|
||||
//! - the Quantity_NameOfColor enumeration
|
||||
//! which lists numerous predefined colors and
|
||||
//! identifies them by their name.
|
||||
class Quantity_Color
|
||||
//! This class allows the definition of an RGB color as triplet of 3 normalized floating point values (red, green, blue).
|
||||
class Quantity_Color
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Creates Quantity_NOC_YELLOW color.
|
||||
Standard_EXPORT Quantity_Color();
|
||||
|
||||
//! Creates Quantity_NOC_YELLOW color (for historical reasons).
|
||||
Quantity_Color() : myRgb (valuesOf (Quantity_NOC_YELLOW, Quantity_TOC_RGB)) {}
|
||||
|
||||
//! Creates the color from enumeration value.
|
||||
Standard_EXPORT Quantity_Color(const Quantity_NameOfColor AName);
|
||||
|
||||
Quantity_Color (const Quantity_NameOfColor theName) : myRgb (valuesOf (theName, Quantity_TOC_RGB)) {}
|
||||
|
||||
//! Creates a color according to the definition system theType.
|
||||
//! Quantity_TOC_RGB:
|
||||
//! - theR1 the value of Red within range [0.0; 1.0]
|
||||
//! - theR2 the value of Green within range [0.0; 1.0]
|
||||
//! - theR3 the value of Blue within range [0.0; 1.0]
|
||||
//!
|
||||
//! Quantity_TOC_HLS:
|
||||
//! - theR1 is the Hue (H) angle in degrees within range [0.0; 360.0], 0.0 being Red.
|
||||
//! Value -1.0 is a special value reserved for grayscale color (S should be 0.0).
|
||||
//! - theR2 is the Lightness (L) within range [0.0; 1.0]
|
||||
//! - theR3 is the Saturation (S) within range [0.0; 1.0]
|
||||
//! Throws exception if values are out of range.
|
||||
Standard_EXPORT Quantity_Color (const Standard_Real theR1,
|
||||
const Standard_Real theR2,
|
||||
const Standard_Real theR3,
|
||||
@ -73,156 +49,108 @@ public:
|
||||
//! Define color from RGB values.
|
||||
Standard_EXPORT explicit Quantity_Color (const NCollection_Vec3<float>& theRgb);
|
||||
|
||||
//! Increases or decreases the contrast by <ADelta>.
|
||||
//! <ADelta> is a percentage. Any value greater than zero
|
||||
//! will increase the contrast.
|
||||
//! The variation is expressed as a percentage of the
|
||||
//! current value.
|
||||
//! It is a variation of the saturation.
|
||||
Standard_EXPORT void ChangeContrast (const Standard_Real ADelta);
|
||||
|
||||
//! Increases or decreases the intensity by <ADelta>.
|
||||
//! <ADelta> is a percentage. Any value greater than zero
|
||||
//! will increase the intensity.
|
||||
//! The variation is expressed as a percentage of the
|
||||
//! current value.
|
||||
//! It is a variation of the lightness.
|
||||
Standard_EXPORT void ChangeIntensity (const Standard_Real ADelta);
|
||||
|
||||
//! Updates the colour <me> from the definition of the
|
||||
//! colour <AName>.
|
||||
Standard_EXPORT void SetValues (const Quantity_NameOfColor AName);
|
||||
|
||||
//! Updates a color according to the mode specified by theType.
|
||||
//! Quantity_TOC_RGB:
|
||||
//! - theR1 the value of Red within range [0.0; 1.0]
|
||||
//! - theR2 the value of Green within range [0.0; 1.0]
|
||||
//! - theR3 the value of Blue within range [0.0; 1.0]
|
||||
//!
|
||||
//! Quantity_TOC_HLS:
|
||||
//! - theR1 is the Hue (H) angle in degrees within range [0.0; 360.0], 0.0 being Red.
|
||||
//! -1.0 is a special value reserved for grayscale color (S should be 0.0).
|
||||
//! - theR2 is the Lightness (L) within range [0.0; 1.0]
|
||||
//! - theR3 is the Saturation (S) within range [0.0; 1.0]
|
||||
Standard_EXPORT void SetValues (const Standard_Real theR1,
|
||||
const Standard_Real theR2,
|
||||
const Standard_Real theR3,
|
||||
const Quantity_TypeOfColor theType);
|
||||
|
||||
//! Returns the percentage change of contrast and intensity
|
||||
//! between <me> and <AColor>.
|
||||
//! <DC> and <DI> are percentages, either positive or negative.
|
||||
//! The calculation is with respect to the current value of <me>
|
||||
//! If <DC> is positive then <me> is more contrasty.
|
||||
//! If <DI> is positive then <me> is more intense.
|
||||
Standard_EXPORT void Delta (const Quantity_Color& AColor, Standard_Real& DC, Standard_Real& DI) const;
|
||||
|
||||
//! Returns the distance between two colours. It's a
|
||||
//! value between 0 and the square root of 3
|
||||
//! (the black/white distance)
|
||||
Standard_EXPORT Standard_Real Distance (const Quantity_Color& AColor) const;
|
||||
|
||||
//! Returns the square of distance between two colours.
|
||||
Standard_EXPORT Standard_Real SquareDistance (const Quantity_Color& AColor) const;
|
||||
|
||||
//! Returns the Blue component (quantity of blue) of the color within range [0.0; 1.0].
|
||||
Standard_EXPORT Standard_Real Blue() const;
|
||||
|
||||
//! Returns the Green component (quantity of green) of the color within range [0.0; 1.0].
|
||||
Standard_EXPORT Standard_Real Green() const;
|
||||
|
||||
//! Returns the Hue component (hue angle) of the color
|
||||
//! in degrees within range [0.0; 360.0], 0.0 being Red.
|
||||
//! -1.0 is a special value reserved for grayscale color (S should be 0.0)
|
||||
Standard_EXPORT Standard_Real Hue() const;
|
||||
|
||||
//! Returns Standard_True if the distance between <me> and
|
||||
//! <Other> is greater than Epsilon ().
|
||||
Standard_EXPORT Standard_Boolean IsDifferent (const Quantity_Color& Other) const;
|
||||
Standard_Boolean operator != (const Quantity_Color& Other) const
|
||||
{
|
||||
return IsDifferent(Other);
|
||||
}
|
||||
|
||||
//! Returns true if the Other color is
|
||||
//! - different from, or
|
||||
//! - equal to this color.
|
||||
//! Two colors are considered to be equal if their
|
||||
//! distance is no greater than Epsilon().
|
||||
//! These methods are aliases of operator != and operator ==.
|
||||
Standard_EXPORT Standard_Boolean IsEqual (const Quantity_Color& Other) const;
|
||||
Standard_Boolean operator == (const Quantity_Color& Other) const
|
||||
{
|
||||
return IsEqual(Other);
|
||||
}
|
||||
|
||||
//! Returns the Light component (value of the lightness) of the color within range [0.0; 1.0].
|
||||
Standard_EXPORT Standard_Real Light() const;
|
||||
|
||||
//! Returns the name of the color defined by its
|
||||
//! quantities of red R, green G and blue B; more
|
||||
//! precisely this is the nearest color from the
|
||||
//! Quantity_NameOfColor enumeration.
|
||||
//! Exceptions
|
||||
//! Standard_OutOfRange if R, G or B is less than 0. or greater than 1.
|
||||
//! Returns the name of the nearest color from the Quantity_NameOfColor enumeration.
|
||||
Standard_EXPORT Quantity_NameOfColor Name() const;
|
||||
|
||||
//! Returns the Red component (quantity of red) of the color within range [0.0; 1.0].
|
||||
Standard_EXPORT Standard_Real Red() const;
|
||||
|
||||
//! Returns the Saturation component (value of the saturation) of the color within range [0.0; 1.0].
|
||||
Standard_EXPORT Standard_Real Saturation() const;
|
||||
|
||||
//! Updates the color from specified named color.
|
||||
void SetValues (const Quantity_NameOfColor theName) { myRgb = valuesOf (theName, Quantity_TOC_RGB); }
|
||||
|
||||
//! Return the color as vector of 3 float elements.
|
||||
operator const NCollection_Vec3<float>&() const { return *(const NCollection_Vec3<float>* )this; }
|
||||
operator const NCollection_Vec3<float>&() const { return myRgb; }
|
||||
|
||||
//! Returns in theR1, theR2 and theR3 the components of this color according to the color system definition theType.
|
||||
//! If theType is Quantity_TOC_RGB:
|
||||
//! - theR1 the value of Red between 0.0 and 1.0
|
||||
//! - theR2 the value of Green between 0.0 and 1.0
|
||||
//! - theR3 the value of Blue between 0.0 and 1.0
|
||||
//! If theType is Quantity_TOC_HLS:
|
||||
//! - theR1 is the Hue (H) angle in degrees within range [0.0; 360.0], 0.0 being Red.
|
||||
//! -1.0 is a special value reserved for grayscale color (S should be 0.0).
|
||||
//! - theR2 is the Lightness (L) within range [0.0; 1.0]
|
||||
//! - theR3 is the Saturation (S) within range [0.0; 1.0]
|
||||
Standard_EXPORT void Values (Standard_Real& theR1,
|
||||
Standard_Real& theR2,
|
||||
Standard_Real& theR3,
|
||||
const Quantity_TypeOfColor theType) const;
|
||||
|
||||
//! Updates a color according to the mode specified by theType.
|
||||
//! Throws exception if values are out of range.
|
||||
Standard_EXPORT void SetValues (const Standard_Real theR1,
|
||||
const Standard_Real theR2,
|
||||
const Standard_Real theR3,
|
||||
const Quantity_TypeOfColor theType);
|
||||
|
||||
//! Returns the Red component (quantity of red) of the color within range [0.0; 1.0].
|
||||
Standard_Real Red() const { return myRgb.r(); }
|
||||
|
||||
//! Returns the Green component (quantity of green) of the color within range [0.0; 1.0].
|
||||
Standard_Real Green() const { return myRgb.g(); }
|
||||
|
||||
//! Returns the Blue component (quantity of blue) of the color within range [0.0; 1.0].
|
||||
Standard_Real Blue() const { return myRgb.b(); }
|
||||
|
||||
//! Returns the Hue component (hue angle) of the color
|
||||
//! in degrees within range [0.0; 360.0], 0.0 being Red.
|
||||
//! -1.0 is a special value reserved for grayscale color (S should be 0.0)
|
||||
Standard_Real Hue() const { return Convert_sRGB_To_HLS (myRgb)[0]; }
|
||||
|
||||
//! Returns the Light component (value of the lightness) of the color within range [0.0; 1.0].
|
||||
Standard_Real Light() const { return Convert_sRGB_To_HLS (myRgb)[1]; }
|
||||
|
||||
//! Increases or decreases the intensity (variation of the lightness).
|
||||
//! The delta is a percentage. Any value greater than zero will increase the intensity.
|
||||
//! The variation is expressed as a percentage of the current value.
|
||||
Standard_EXPORT void ChangeIntensity (const Standard_Real theDelta);
|
||||
|
||||
//! Returns the Saturation component (value of the saturation) of the color within range [0.0; 1.0].
|
||||
Standard_Real Saturation() const { return Convert_sRGB_To_HLS (myRgb)[2]; }
|
||||
|
||||
//! Increases or decreases the contrast (variation of the saturation).
|
||||
//! The delta is a percentage. Any value greater than zero will increase the contrast.
|
||||
//! The variation is expressed as a percentage of the current value.
|
||||
Standard_EXPORT void ChangeContrast (const Standard_Real theDelta);
|
||||
|
||||
//! Returns TRUE if the distance between two colors is greater than Epsilon().
|
||||
Standard_Boolean IsDifferent (const Quantity_Color& theOther) const { return (Distance (theOther) > Epsilon()); }
|
||||
|
||||
//! Alias to IsDifferent().
|
||||
Standard_Boolean operator!= (const Quantity_Color& theOther) const { return IsDifferent (theOther); }
|
||||
|
||||
//! Returns TRUE if the distance between two colors is no greater than Epsilon().
|
||||
Standard_Boolean IsEqual (const Quantity_Color& theOther) const { return (Distance (theOther) <= Epsilon()); }
|
||||
|
||||
//! Alias to IsEqual().
|
||||
Standard_Boolean operator== (const Quantity_Color& theOther) const { return IsEqual (theOther); }
|
||||
|
||||
//! Sets the specified value used to compare <me> and
|
||||
//! an other color in IsDifferent and in IsEqual methods.
|
||||
//! Warning: The default value is 0.0001
|
||||
Standard_EXPORT static void SetEpsilon (const Standard_Real AnEpsilon);
|
||||
|
||||
//! Returns the specified value used to compare <me> and
|
||||
//! an other color in IsDifferent and in IsEqual methods.
|
||||
Standard_EXPORT static Standard_Real Epsilon();
|
||||
|
||||
//! Returns the name of the colour for which the RGB components
|
||||
//! are nearest to <R>, <G> and <B>.
|
||||
Standard_EXPORT static Quantity_NameOfColor Name (const Standard_Real R, const Standard_Real G, const Standard_Real B);
|
||||
|
||||
//! Returns the name of the color identified by
|
||||
//! AName in the Quantity_NameOfColor enumeration.
|
||||
//! For example, the name of the color which
|
||||
//! corresponds to Quantity_NOC_BLACK is "BLACK".
|
||||
//! Exceptions
|
||||
//! Standard_OutOfRange if AName in not known
|
||||
//! in the Quantity_NameOfColor enumeration.
|
||||
Standard_EXPORT static Standard_CString StringName (const Quantity_NameOfColor AColor);
|
||||
|
||||
//! Returns the distance between two colors. It's a value between 0 and the square root of 3 (the black/white distance).
|
||||
Standard_Real Distance (const Quantity_Color& theColor) const
|
||||
{
|
||||
return (NCollection_Vec3<Standard_Real> (myRgb) - NCollection_Vec3<Standard_Real> (theColor.myRgb)).Modulus();
|
||||
}
|
||||
|
||||
//! Returns the square of distance between two colors.
|
||||
Standard_Real SquareDistance (const Quantity_Color& theColor) const
|
||||
{
|
||||
return (NCollection_Vec3<Standard_Real> (myRgb) - NCollection_Vec3<Standard_Real> (theColor.myRgb)).SquareModulus();
|
||||
}
|
||||
|
||||
//! Returns the percentage change of contrast and intensity between this and another color.
|
||||
//! <DC> and <DI> are percentages, either positive or negative.
|
||||
//! The calculation is with respect to this color.
|
||||
//! If <DC> is positive then <me> is more contrasty.
|
||||
//! If <DI> is positive then <me> is more intense.
|
||||
Standard_EXPORT void Delta (const Quantity_Color& theColor,
|
||||
Standard_Real& DC, Standard_Real& DI) const;
|
||||
|
||||
public:
|
||||
|
||||
//! Returns the color from Quantity_NameOfColor enumeration nearest to specified RGB values.
|
||||
static Quantity_NameOfColor Name (const Standard_Real theR, const Standard_Real theG, const Standard_Real theB)
|
||||
{
|
||||
const Quantity_Color aColor (theR, theG, theB, Quantity_TOC_RGB);
|
||||
return aColor.Name();
|
||||
}
|
||||
|
||||
//! Returns the name of the color identified by the given Quantity_NameOfColor enumeration value.
|
||||
Standard_EXPORT static Standard_CString StringName (const Quantity_NameOfColor theColor);
|
||||
|
||||
//! Finds color from predefined names.
|
||||
//! For example, the name of the color which
|
||||
//! corresponds to "BLACK" is Quantity_NOC_BLACK.
|
||||
//! Returns false if name is unknown.
|
||||
//! For example, the name of the color which corresponds to "BLACK" is Quantity_NOC_BLACK.
|
||||
//! Returns FALSE if name is unknown.
|
||||
Standard_EXPORT static Standard_Boolean ColorFromName (const Standard_CString theName, Quantity_NameOfColor& theColor);
|
||||
|
||||
//! Finds color from predefined names.
|
||||
//! For example, the name of the color which
|
||||
//! corresponds to "BLACK" is Quantity_NOC_BLACK.
|
||||
//! Returns false if name is unknown.
|
||||
//! @param theColorNameString the color name
|
||||
//! @param theColor a found color
|
||||
//! @return false if the color name is unknown, or true if the search by color name was successful
|
||||
@ -237,7 +165,7 @@ Standard_Boolean operator == (const Quantity_Color& Other) const
|
||||
return true;
|
||||
}
|
||||
|
||||
//! Parses the string as a hex color (like "#FF0" for short RGB color, or "#FFFF00" for RGB color)
|
||||
//! Parses the string as a hex color (like "#FF0" for short sRGB color, or "#FFFF00" for sRGB color)
|
||||
//! @param theHexColorString the string to be parsed
|
||||
//! @param theColor a color that is a result of parsing
|
||||
//! @return true if parsing was successful, or false otherwise
|
||||
@ -255,20 +183,153 @@ Standard_Boolean operator == (const Quantity_Color& Other) const
|
||||
return aBuff;
|
||||
}
|
||||
|
||||
//! Converts sRGB components into HLS ones.
|
||||
Standard_EXPORT static NCollection_Vec3<float> Convert_sRGB_To_HLS (const NCollection_Vec3<float>& theRgb);
|
||||
|
||||
//! Converts HLS components into RGB ones.
|
||||
Standard_EXPORT static void HlsRgb (const Standard_Real H, const Standard_Real L, const Standard_Real S, Standard_Real& R, Standard_Real& G, Standard_Real& B);
|
||||
|
||||
//! Converts RGB components into HLS ones.
|
||||
Standard_EXPORT static void RgbHls (const Standard_Real R, const Standard_Real G, const Standard_Real B, Standard_Real& H, Standard_Real& L, Standard_Real& S);
|
||||
|
||||
//! Convert the Color value to ARGB integer value.
|
||||
//! theARGB has Alpha equal to zero, so the output is
|
||||
//! formatted as 0x00RRGGBB
|
||||
Standard_EXPORT static void Color2argb (const Quantity_Color& theColor, Standard_Integer& theARGB);
|
||||
|
||||
Standard_EXPORT static NCollection_Vec3<float> Convert_HLS_To_sRGB (const NCollection_Vec3<float>& theHls);
|
||||
|
||||
//! Converts Linear RGB components into HLS ones.
|
||||
static NCollection_Vec3<float> Convert_LinearRGB_To_HLS (const NCollection_Vec3<float>& theRgb)
|
||||
{
|
||||
return Convert_sRGB_To_HLS (Convert_LinearRGB_To_sRGB (theRgb));
|
||||
}
|
||||
|
||||
//! Converts HLS components into linear RGB ones.
|
||||
static NCollection_Vec3<float> Convert_HLS_To_LinearRGB (const NCollection_Vec3<float>& theHls)
|
||||
{
|
||||
return Convert_sRGB_To_LinearRGB (Convert_HLS_To_sRGB (theHls));
|
||||
}
|
||||
|
||||
//! Convert the color value to ARGB integer value, with alpha equals to 0.
|
||||
//! So the output is formatted as 0x00RRGGBB.
|
||||
//! @param theColor [in] color to convert
|
||||
//! @param theARGB [out] result color encoded as integer
|
||||
static void Color2argb (const Quantity_Color& theColor,
|
||||
Standard_Integer& theARGB)
|
||||
{
|
||||
const NCollection_Vec3<Standard_Integer> aColor (static_cast<Standard_Integer> (255.0f * theColor.myRgb.r() + 0.5f),
|
||||
static_cast<Standard_Integer> (255.0f * theColor.myRgb.g() + 0.5f),
|
||||
static_cast<Standard_Integer> (255.0f * theColor.myRgb.b() + 0.5f));
|
||||
theARGB = (((aColor.r() & 0xff) << 16)
|
||||
| ((aColor.g() & 0xff) << 8)
|
||||
| (aColor.b() & 0xff));
|
||||
}
|
||||
|
||||
//! Convert integer ARGB value to Color. Alpha bits are ignored
|
||||
Standard_EXPORT static void Argb2color (const Standard_Integer theARGB, Quantity_Color& theColor);
|
||||
|
||||
static void Argb2color (const Standard_Integer theARGB,
|
||||
Quantity_Color& theColor)
|
||||
{
|
||||
const NCollection_Vec3<Standard_Real> aColor (static_cast <Standard_Real> ((theARGB & 0xff0000) >> 16),
|
||||
static_cast <Standard_Real> ((theARGB & 0x00ff00) >> 8),
|
||||
static_cast <Standard_Real> ((theARGB & 0x0000ff)));
|
||||
theColor.SetValues (aColor.r() / 255.0, aColor.g() / 255.0, aColor.b() / 255.0, Quantity_TOC_RGB);
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
//! Convert linear RGB component into sRGB using OpenGL specs formula (double precision), also known as gamma correction.
|
||||
static Standard_Real Convert_LinearRGB_To_sRGB (Standard_Real theLinearValue)
|
||||
{
|
||||
return theLinearValue <= 0.0031308
|
||||
? theLinearValue * 12.92
|
||||
: Pow (theLinearValue, 1.0/2.4) * 1.055 - 0.055;
|
||||
}
|
||||
|
||||
//! Convert linear RGB component into sRGB using OpenGL specs formula (single precision), also known as gamma correction.
|
||||
static float Convert_LinearRGB_To_sRGB (float theLinearValue)
|
||||
{
|
||||
return theLinearValue <= 0.0031308f
|
||||
? theLinearValue * 12.92f
|
||||
: powf (theLinearValue, 1.0f/2.4f) * 1.055f - 0.055f;
|
||||
}
|
||||
|
||||
//! Convert sRGB component into linear RGB using OpenGL specs formula (double precision), also known as gamma correction.
|
||||
static Standard_Real Convert_sRGB_To_LinearRGB (Standard_Real thesRGBValue)
|
||||
{
|
||||
return thesRGBValue <= 0.04045
|
||||
? thesRGBValue / 12.92
|
||||
: Pow ((thesRGBValue + 0.055) / 1.055, 2.4);
|
||||
}
|
||||
|
||||
//! Convert sRGB component into linear RGB using OpenGL specs formula (single precision), also known as gamma correction.
|
||||
static float Convert_sRGB_To_LinearRGB (float thesRGBValue)
|
||||
{
|
||||
return thesRGBValue <= 0.04045f
|
||||
? thesRGBValue / 12.92f
|
||||
: powf ((thesRGBValue + 0.055f) / 1.055f, 2.4f);
|
||||
}
|
||||
|
||||
//! Convert linear RGB components into sRGB using OpenGL specs formula.
|
||||
template<typename T>
|
||||
static NCollection_Vec3<T> Convert_LinearRGB_To_sRGB (const NCollection_Vec3<T>& theRGB)
|
||||
{
|
||||
return NCollection_Vec3<T> (Convert_LinearRGB_To_sRGB (theRGB.r()),
|
||||
Convert_LinearRGB_To_sRGB (theRGB.g()),
|
||||
Convert_LinearRGB_To_sRGB (theRGB.b()));
|
||||
}
|
||||
|
||||
//! Convert sRGB components into linear RGB using OpenGL specs formula.
|
||||
template<typename T>
|
||||
static NCollection_Vec3<T> Convert_sRGB_To_LinearRGB (const NCollection_Vec3<T>& theRGB)
|
||||
{
|
||||
return NCollection_Vec3<T> (Convert_sRGB_To_LinearRGB (theRGB.r()),
|
||||
Convert_sRGB_To_LinearRGB (theRGB.g()),
|
||||
Convert_sRGB_To_LinearRGB (theRGB.b()));
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
//! Convert linear RGB component into sRGB using approximated uniform gamma coefficient 2.2.
|
||||
static float Convert_LinearRGB_To_sRGB_approx22 (float theLinearValue) { return powf (theLinearValue, 2.2f); }
|
||||
|
||||
//! Convert sRGB component into linear RGB using approximated uniform gamma coefficient 2.2
|
||||
static float Convert_sRGB_To_LinearRGB_approx22 (float thesRGBValue) { return powf (thesRGBValue, 1.0f/2.2f); }
|
||||
|
||||
//! Convert linear RGB components into sRGB using approximated uniform gamma coefficient 2.2
|
||||
static NCollection_Vec3<float> Convert_LinearRGB_To_sRGB_approx22 (const NCollection_Vec3<float>& theRGB)
|
||||
{
|
||||
return NCollection_Vec3<float> (Convert_LinearRGB_To_sRGB_approx22 (theRGB.r()),
|
||||
Convert_LinearRGB_To_sRGB_approx22 (theRGB.g()),
|
||||
Convert_LinearRGB_To_sRGB_approx22 (theRGB.b()));
|
||||
}
|
||||
|
||||
//! Convert sRGB components into linear RGB using approximated uniform gamma coefficient 2.2
|
||||
static NCollection_Vec3<float> Convert_sRGB_To_LinearRGB_approx22 (const NCollection_Vec3<float>& theRGB)
|
||||
{
|
||||
return NCollection_Vec3<float> (Convert_sRGB_To_LinearRGB_approx22 (theRGB.r()),
|
||||
Convert_sRGB_To_LinearRGB_approx22 (theRGB.g()),
|
||||
Convert_sRGB_To_LinearRGB_approx22 (theRGB.b()));
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
//! Returns the value used to compare two colors for equality; 0.0001 by default.
|
||||
Standard_EXPORT static Standard_Real Epsilon();
|
||||
|
||||
//! Set the value used to compare two colors for equality.
|
||||
Standard_EXPORT static void SetEpsilon (const Standard_Real theEpsilon);
|
||||
|
||||
//! Converts HLS components into RGB ones.
|
||||
static void HlsRgb (const Standard_Real theH, const Standard_Real theL, const Standard_Real theS,
|
||||
Standard_Real& theR, Standard_Real& theG, Standard_Real& theB)
|
||||
{
|
||||
const NCollection_Vec3<float> anRgb = Convert_HLS_To_sRGB (NCollection_Vec3<float> ((float )theH, (float )theL, (float )theS));
|
||||
theR = anRgb[0];
|
||||
theG = anRgb[1];
|
||||
theB = anRgb[2];
|
||||
}
|
||||
|
||||
//! Converts RGB components into HLS ones.
|
||||
static void RgbHls (const Standard_Real theR, const Standard_Real theG, const Standard_Real theB,
|
||||
Standard_Real& theH, Standard_Real& theL, Standard_Real& theS)
|
||||
{
|
||||
const NCollection_Vec3<float> aHls = Convert_sRGB_To_HLS (NCollection_Vec3<float> ((float )theR, (float )theG, (float )theB));
|
||||
theH = aHls[0];
|
||||
theL = aHls[1];
|
||||
theS = aHls[2];
|
||||
}
|
||||
|
||||
//! Internal test
|
||||
Standard_EXPORT static void Test();
|
||||
|
||||
@ -277,27 +338,13 @@ Standard_Boolean operator == (const Quantity_Color& Other) const
|
||||
|
||||
private:
|
||||
|
||||
//! Converts HLS components into RGB ones.
|
||||
Standard_EXPORT static void hlsrgb (const Standard_ShortReal H, const Standard_ShortReal L, const Standard_ShortReal S, Standard_ShortReal& R, Standard_ShortReal& G, Standard_ShortReal& B);
|
||||
|
||||
//! Converts RGB components into HLS ones.
|
||||
Standard_EXPORT static void rgbhls (const Standard_ShortReal R, const Standard_ShortReal G, const Standard_ShortReal B, Standard_ShortReal& H, Standard_ShortReal& L, Standard_ShortReal& S);
|
||||
|
||||
//! Returns the values of a predefined colour according to
|
||||
//! the mode specified by TypeOfColor
|
||||
//! TOC_RGB : <R1> the value of red between 0. and 1.
|
||||
//! <R2> the value of green between 0. and 1.
|
||||
//! <R3> the value of blue between 0. and 1.
|
||||
//!
|
||||
//! TOC_HLS : <R1> is the hue angle in degrees, 0. being red
|
||||
//! <R2> is the lightness between 0. and 1.
|
||||
//! <R3> is the saturation between 0. and 1.
|
||||
Standard_EXPORT static void ValuesOf (const Quantity_NameOfColor AName, const Quantity_TypeOfColor AType, Standard_ShortReal& R1, Standard_ShortReal& R2, Standard_ShortReal& R3);
|
||||
//! Returns the values of a predefined color according to the mode.
|
||||
Standard_EXPORT static NCollection_Vec3<float> valuesOf (const Quantity_NameOfColor theName,
|
||||
const Quantity_TypeOfColor theType);
|
||||
|
||||
private:
|
||||
|
||||
Standard_ShortReal MyRed;
|
||||
Standard_ShortReal MyGreen;
|
||||
Standard_ShortReal MyBlue;
|
||||
NCollection_Vec3<float> myRgb;
|
||||
|
||||
};
|
||||
|
||||
|
@ -1,37 +0,0 @@
|
||||
// Created on: 1994-02-08
|
||||
// Created by: Gilles DEBARBOUILLE
|
||||
// Copyright (c) 1994-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Quantity_ColorDefinitionError_HeaderFile
|
||||
#define _Quantity_ColorDefinitionError_HeaderFile
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_DefineException.hxx>
|
||||
#include <Standard_SStream.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
|
||||
class Quantity_ColorDefinitionError;
|
||||
DEFINE_STANDARD_HANDLE(Quantity_ColorDefinitionError, Standard_DomainError)
|
||||
|
||||
#if !defined No_Exception && !defined No_Quantity_ColorDefinitionError
|
||||
#define Quantity_ColorDefinitionError_Raise_if(CONDITION, MESSAGE) \
|
||||
if (CONDITION) throw Quantity_ColorDefinitionError(MESSAGE);
|
||||
#else
|
||||
#define Quantity_ColorDefinitionError_Raise_if(CONDITION, MESSAGE)
|
||||
#endif
|
||||
|
||||
DEFINE_STANDARD_EXCEPTION(Quantity_ColorDefinitionError, Standard_DomainError)
|
||||
|
||||
#endif // _Quantity_ColorDefinitionError_HeaderFile
|
@ -91,10 +91,10 @@ public:
|
||||
//! Two colors are considered to be equal if their distance is no greater than Epsilon().
|
||||
bool operator== (const Quantity_ColorRGBA& theOther) const { return IsEqual (theOther); }
|
||||
|
||||
public:
|
||||
|
||||
//! Finds color from predefined names.
|
||||
//! For example, the name of the color which
|
||||
//! corresponds to "BLACK" is Quantity_NOC_BLACK.
|
||||
//! Returns false if name is unknown.
|
||||
//! For example, the name of the color which corresponds to "BLACK" is Quantity_NOC_BLACK.
|
||||
//! An alpha component is set to 1.0.
|
||||
//! @param theColorNameString the color name
|
||||
//! @param theColor a found color
|
||||
@ -110,7 +110,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
//! Parses the string as a hex color (like "#FF0" for short RGB color, "#FF0F" for short RGBA color,
|
||||
//! Parses the string as a hex color (like "#FF0" for short sRGB color, "#FF0F" for short sRGBA color,
|
||||
//! "#FFFF00" for RGB color, or "#FFFF00FF" for RGBA color)
|
||||
//! @param theHexColorString the string to be parsed
|
||||
//! @param theColor a color that is a result of parsing
|
||||
@ -133,6 +133,28 @@ public:
|
||||
return aBuff;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
//! Convert linear RGB components into sRGB using OpenGL specs formula.
|
||||
static NCollection_Vec4<float> Convert_LinearRGB_To_sRGB (const NCollection_Vec4<float>& theRGB)
|
||||
{
|
||||
return NCollection_Vec4<float> (Quantity_Color::Convert_LinearRGB_To_sRGB (theRGB.r()),
|
||||
Quantity_Color::Convert_LinearRGB_To_sRGB (theRGB.g()),
|
||||
Quantity_Color::Convert_LinearRGB_To_sRGB (theRGB.b()),
|
||||
theRGB.a());
|
||||
}
|
||||
|
||||
//! Convert sRGB components into linear RGB using OpenGL specs formula.
|
||||
static NCollection_Vec4<float> Convert_sRGB_To_LinearRGB (const NCollection_Vec4<float>& theRGB)
|
||||
{
|
||||
return NCollection_Vec4<float> (Quantity_Color::Convert_sRGB_To_LinearRGB (theRGB.r()),
|
||||
Quantity_Color::Convert_sRGB_To_LinearRGB (theRGB.g()),
|
||||
Quantity_Color::Convert_sRGB_To_LinearRGB (theRGB.b()),
|
||||
theRGB.a());
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
//! Dumps the content of me into the stream
|
||||
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, const Standard_Integer theDepth = -1) const;
|
||||
|
||||
|
509
src/Quantity/Quantity_ColorTable.pxx
Normal file
509
src/Quantity/Quantity_ColorTable.pxx
Normal file
@ -0,0 +1,509 @@
|
||||
RawColor(BLACK , 0x000000, 0.000000, 0.000000, 0.000000),
|
||||
RawColor(MATRABLUE , 0x0000BF, 0.000000, 0.000000, 0.750000),
|
||||
RawColor(MATRAGRAY , 0x999999, 0.600000, 0.600000, 0.600000),
|
||||
RawColor(ALICEBLUE , 0xF0F8FF, 0.941176, 0.972549, 1.000000),
|
||||
RawColor(ANTIQUEWHITE , 0xFAEBD7, 0.980392, 0.921569, 0.843137),
|
||||
RawColor(ANTIQUEWHITE1 , 0xFFEFDB, 1.000000, 0.937255, 0.858824),
|
||||
RawColor(ANTIQUEWHITE2 , 0xEEDFCC, 0.933333, 0.874510, 0.800000),
|
||||
RawColor(ANTIQUEWHITE3 , 0xCDC0B0, 0.803922, 0.752941, 0.690196),
|
||||
RawColor(ANTIQUEWHITE4 , 0x8B8378, 0.545098, 0.513725, 0.470588),
|
||||
RawColor(AQUAMARINE1 , 0x7FFFD4, 0.498039, 1.000000, 0.831373),
|
||||
RawColor(AQUAMARINE2 , 0x76EEC6, 0.462745, 0.933333, 0.776471),
|
||||
RawColor(AQUAMARINE4 , 0x458B74, 0.270588, 0.545098, 0.454902),
|
||||
RawColor(AZURE , 0xF0FFFF, 0.941176, 1.000000, 1.000000),
|
||||
RawColor(AZURE2 , 0xE0EEEE, 0.878431, 0.933333, 0.933333),
|
||||
RawColor(AZURE3 , 0xC1CDCD, 0.756863, 0.803922, 0.803922),
|
||||
RawColor(AZURE4 , 0x838B8B, 0.513725, 0.545098, 0.545098),
|
||||
RawColor(BEIGE , 0xF5F5DC, 0.960784, 0.960784, 0.862745),
|
||||
RawColor(BISQUE , 0xFFE4C4, 1.000000, 0.894118, 0.768627),
|
||||
RawColor(BISQUE2 , 0xEED5B7, 0.933333, 0.835294, 0.717647),
|
||||
RawColor(BISQUE3 , 0xCDB79E, 0.803922, 0.717647, 0.619608),
|
||||
RawColor(BISQUE4 , 0x8B7D6B, 0.545098, 0.490196, 0.419608),
|
||||
RawColor(BLANCHEDALMOND , 0xFFEBCD, 1.000000, 0.921569, 0.803922),
|
||||
RawColor(BLUE , 0x0000FF, 0.000000, 0.000000, 1.000000),
|
||||
RawColor(BLUE2 , 0x0000EE, 0.000000, 0.000000, 0.933333),
|
||||
RawColor(BLUE3 , 0x0000CD, 0.000000, 0.000000, 0.803922),
|
||||
RawColor(BLUE4 , 0x00008B, 0.000000, 0.000000, 0.545098),
|
||||
RawColor(BLUEVIOLET , 0x8A2BE2, 0.541176, 0.168627, 0.886275),
|
||||
RawColor(BROWN , 0xA52A2A, 0.647059, 0.164706, 0.164706),
|
||||
RawColor(BROWN1 , 0xFF4040, 1.000000, 0.250980, 0.250980),
|
||||
RawColor(BROWN2 , 0xEE3B3B, 0.933333, 0.231373, 0.231373),
|
||||
RawColor(BROWN3 , 0xCD3333, 0.803922, 0.200000, 0.200000),
|
||||
RawColor(BROWN4 , 0x8B2323, 0.545098, 0.137255, 0.137255),
|
||||
RawColor(BURLYWOOD , 0xDEB887, 0.870588, 0.721569, 0.529412),
|
||||
RawColor(BURLYWOOD1 , 0xFFD39B, 1.000000, 0.827451, 0.607843),
|
||||
RawColor(BURLYWOOD2 , 0xEEC591, 0.933333, 0.772549, 0.568627),
|
||||
RawColor(BURLYWOOD3 , 0xCDAA7D, 0.803922, 0.666667, 0.490196),
|
||||
RawColor(BURLYWOOD4 , 0x8B7355, 0.545098, 0.450980, 0.333333),
|
||||
RawColor(CADETBLUE , 0x5F9EA0, 0.372549, 0.619608, 0.627451),
|
||||
RawColor(CADETBLUE1 , 0x98F5FF, 0.596078, 0.960784, 1.000000),
|
||||
RawColor(CADETBLUE2 , 0x8EE5EE, 0.556863, 0.898039, 0.933333),
|
||||
RawColor(CADETBLUE3 , 0x7AC5CD, 0.478431, 0.772549, 0.803922),
|
||||
RawColor(CADETBLUE4 , 0x53868B, 0.325490, 0.525490, 0.545098),
|
||||
RawColor(CHARTREUSE , 0x7FFF00, 0.498039, 1.000000, 0.000000),
|
||||
RawColor(CHARTREUSE2 , 0x76EE00, 0.462745, 0.933333, 0.000000),
|
||||
RawColor(CHARTREUSE3 , 0x66CD00, 0.400000, 0.803922, 0.000000),
|
||||
RawColor(CHARTREUSE4 , 0x458B00, 0.270588, 0.545098, 0.000000),
|
||||
RawColor(CHOCOLATE , 0xD2691E, 0.823529, 0.411765, 0.117647),
|
||||
RawColor(CHOCOLATE1 , 0xFF7F24, 1.000000, 0.498039, 0.141176),
|
||||
RawColor(CHOCOLATE2 , 0xEE7621, 0.933333, 0.462745, 0.129412),
|
||||
RawColor(CHOCOLATE3 , 0xCD661D, 0.803922, 0.400000, 0.113725),
|
||||
RawColor(CHOCOLATE4 , 0x8B4513, 0.545098, 0.270588, 0.074510),
|
||||
RawColor(CORAL , 0xFF7F50, 1.000000, 0.498039, 0.313725),
|
||||
RawColor(CORAL1 , 0xFF7256, 1.000000, 0.447059, 0.337255),
|
||||
RawColor(CORAL2 , 0xEE6A50, 0.933333, 0.415686, 0.313725),
|
||||
RawColor(CORAL3 , 0xCD5B45, 0.803922, 0.356863, 0.270588),
|
||||
RawColor(CORAL4 , 0x8B3E2F, 0.545098, 0.243137, 0.184314),
|
||||
RawColor(CORNFLOWERBLUE , 0x6495ED, 0.392157, 0.584314, 0.929412),
|
||||
RawColor(CORNSILK1 , 0xFFF8DC, 1.000000, 0.972549, 0.862745),
|
||||
RawColor(CORNSILK2 , 0xEEE8CD, 0.933333, 0.909804, 0.803922),
|
||||
RawColor(CORNSILK3 , 0xCDC8B1, 0.803922, 0.784314, 0.694118),
|
||||
RawColor(CORNSILK4 , 0x8B8878, 0.545098, 0.533333, 0.470588),
|
||||
RawColor(CYAN , 0x00FFFF, 0.000000, 1.000000, 1.000000),
|
||||
RawColor(CYAN2 , 0x00EEEE, 0.000000, 0.933333, 0.933333),
|
||||
RawColor(CYAN3 , 0x00CDCD, 0.000000, 0.803922, 0.803922),
|
||||
RawColor(CYAN4 , 0x008B8B, 0.000000, 0.545098, 0.545098),
|
||||
RawColor(DARKGOLDENROD , 0xB8860B, 0.721569, 0.525490, 0.043137),
|
||||
RawColor(DARKGOLDENROD1 , 0xFFB90F, 1.000000, 0.725490, 0.058824),
|
||||
RawColor(DARKGOLDENROD2 , 0xEEAD0E, 0.933333, 0.678431, 0.054902),
|
||||
RawColor(DARKGOLDENROD3 , 0xCD950C, 0.803922, 0.584314, 0.047059),
|
||||
RawColor(DARKGOLDENROD4 , 0x8B6508, 0.545098, 0.396078, 0.031373),
|
||||
RawColor(DARKGREEN , 0x006400, 0.000000, 0.392157, 0.000000),
|
||||
RawColor(DARKKHAKI , 0xBDB76B, 0.741176, 0.717647, 0.419608),
|
||||
RawColor(DARKOLIVEGREEN , 0x556B2F, 0.333333, 0.419608, 0.184314),
|
||||
RawColor(DARKOLIVEGREEN1 , 0xCAFF70, 0.792157, 1.000000, 0.439216),
|
||||
RawColor(DARKOLIVEGREEN2 , 0xBCEE68, 0.737255, 0.933333, 0.407843),
|
||||
RawColor(DARKOLIVEGREEN3 , 0xA2CD5A, 0.635294, 0.803922, 0.352941),
|
||||
RawColor(DARKOLIVEGREEN4 , 0x6E8B3D, 0.431373, 0.545098, 0.239216),
|
||||
RawColor(DARKORANGE , 0xFF8C00, 1.000000, 0.549020, 0.000000),
|
||||
RawColor(DARKORANGE1 , 0xFF7F00, 1.000000, 0.498039, 0.000000),
|
||||
RawColor(DARKORANGE2 , 0xEE7600, 0.933333, 0.462745, 0.000000),
|
||||
RawColor(DARKORANGE3 , 0xCD6600, 0.803922, 0.400000, 0.000000),
|
||||
RawColor(DARKORANGE4 , 0x8B4500, 0.545098, 0.270588, 0.000000),
|
||||
RawColor(DARKORCHID , 0x9932CC, 0.600000, 0.196078, 0.800000),
|
||||
RawColor(DARKORCHID1 , 0xBF3EFF, 0.749020, 0.243137, 1.000000),
|
||||
RawColor(DARKORCHID2 , 0xB23AEE, 0.698039, 0.227451, 0.933333),
|
||||
RawColor(DARKORCHID3 , 0x9A32CD, 0.603922, 0.196078, 0.803922),
|
||||
RawColor(DARKORCHID4 , 0x68228B, 0.407843, 0.133333, 0.545098),
|
||||
RawColor(DARKSALMON , 0xE9967A, 0.913725, 0.588235, 0.478431),
|
||||
RawColor(DARKSEAGREEN , 0x8FBC8F, 0.560784, 0.737255, 0.560784),
|
||||
RawColor(DARKSEAGREEN1 , 0xC1FFC1, 0.756863, 1.000000, 0.756863),
|
||||
RawColor(DARKSEAGREEN2 , 0xB4EEB4, 0.705882, 0.933333, 0.705882),
|
||||
RawColor(DARKSEAGREEN3 , 0x9BCD9B, 0.607843, 0.803922, 0.607843),
|
||||
RawColor(DARKSEAGREEN4 , 0x698B69, 0.411765, 0.545098, 0.411765),
|
||||
RawColor(DARKSLATEBLUE , 0x483D8B, 0.282353, 0.239216, 0.545098),
|
||||
RawColor(DARKSLATEGRAY1 , 0x97FFFF, 0.592157, 1.000000, 1.000000),
|
||||
RawColor(DARKSLATEGRAY2 , 0x8DEEEE, 0.552941, 0.933333, 0.933333),
|
||||
RawColor(DARKSLATEGRAY3 , 0x79CDCD, 0.474510, 0.803922, 0.803922),
|
||||
RawColor(DARKSLATEGRAY4 , 0x528B8B, 0.321569, 0.545098, 0.545098),
|
||||
RawColor(DARKSLATEGRAY , 0x2F4F4F, 0.184314, 0.309804, 0.309804),
|
||||
RawColor(DARKTURQUOISE , 0x00CED1, 0.000000, 0.807843, 0.819608),
|
||||
RawColor(DARKVIOLET , 0x9400D3, 0.580392, 0.000000, 0.827451),
|
||||
RawColor(DEEPPINK , 0xFF1493, 1.000000, 0.078431, 0.576471),
|
||||
RawColor(DEEPPINK2 , 0xEE1289, 0.933333, 0.070588, 0.537255),
|
||||
RawColor(DEEPPINK3 , 0xCD1076, 0.803922, 0.062745, 0.462745),
|
||||
RawColor(DEEPPINK4 , 0x8B0A50, 0.545098, 0.039216, 0.313725),
|
||||
RawColor(DEEPSKYBLUE1 , 0x00BFFF, 0.000000, 0.749020, 1.000000),
|
||||
RawColor(DEEPSKYBLUE2 , 0x00B2EE, 0.000000, 0.698039, 0.933333),
|
||||
RawColor(DEEPSKYBLUE3 , 0x009ACD, 0.000000, 0.603922, 0.803922),
|
||||
RawColor(DEEPSKYBLUE4 , 0x00688B, 0.000000, 0.407843, 0.545098),
|
||||
RawColor(DODGERBLUE1 , 0x1E90FF, 0.117647, 0.564706, 1.000000),
|
||||
RawColor(DODGERBLUE2 , 0x1C86EE, 0.109804, 0.525490, 0.933333),
|
||||
RawColor(DODGERBLUE3 , 0x1874CD, 0.094118, 0.454902, 0.803922),
|
||||
RawColor(DODGERBLUE4 , 0x104E8B, 0.062745, 0.305882, 0.545098),
|
||||
RawColor(FIREBRICK , 0xB22222, 0.698039, 0.133333, 0.133333),
|
||||
RawColor(FIREBRICK1 , 0xFF3030, 1.000000, 0.188235, 0.188235),
|
||||
RawColor(FIREBRICK2 , 0xEE2C2C, 0.933333, 0.172549, 0.172549),
|
||||
RawColor(FIREBRICK3 , 0xCD2626, 0.803922, 0.149020, 0.149020),
|
||||
RawColor(FIREBRICK4 , 0x8B1A1A, 0.545098, 0.101961, 0.101961),
|
||||
RawColor(FLORALWHITE , 0xFFFAF0, 1.000000, 0.980392, 0.941176),
|
||||
RawColor(FORESTGREEN , 0x228B22, 0.133333, 0.545098, 0.133333),
|
||||
RawColor(GAINSBORO , 0xDCDCDC, 0.862745, 0.862745, 0.862745),
|
||||
RawColor(GHOSTWHITE , 0xF8F8FF, 0.972549, 0.972549, 1.000000),
|
||||
RawColor(GOLD , 0xFFD700, 1.000000, 0.843137, 0.000000),
|
||||
RawColor(GOLD2 , 0xEEC900, 0.933333, 0.788235, 0.000000),
|
||||
RawColor(GOLD3 , 0xCDAD00, 0.803922, 0.678431, 0.000000),
|
||||
RawColor(GOLD4 , 0x8B7500, 0.545098, 0.458824, 0.000000),
|
||||
RawColor(GOLDENROD , 0xDAA520, 0.854902, 0.647059, 0.125490),
|
||||
RawColor(GOLDENROD1 , 0xFFC125, 1.000000, 0.756863, 0.145098),
|
||||
RawColor(GOLDENROD2 , 0xEEB422, 0.933333, 0.705882, 0.133333),
|
||||
RawColor(GOLDENROD3 , 0xCD9B1D, 0.803922, 0.607843, 0.113725),
|
||||
RawColor(GOLDENROD4 , 0x8B6914, 0.545098, 0.411765, 0.078431),
|
||||
RawColor(GRAY , 0xC0C0C0, 0.752941, 0.752941, 0.752941),
|
||||
RawColor(GRAY0 , 0x000000, 0.000000, 0.000000, 0.000000),
|
||||
RawColor(GRAY1 , 0x030303, 0.011765, 0.011765, 0.011765),
|
||||
RawColor(GRAY2 , 0x050505, 0.019608, 0.019608, 0.019608),
|
||||
RawColor(GRAY3 , 0x080808, 0.031373, 0.031373, 0.031373),
|
||||
RawColor(GRAY4 , 0x0A0A0A, 0.039216, 0.039216, 0.039216),
|
||||
RawColor(GRAY5 , 0x0D0D0D, 0.050980, 0.050980, 0.050980),
|
||||
RawColor(GRAY6 , 0x0F0F0F, 0.058824, 0.058824, 0.058824),
|
||||
RawColor(GRAY7 , 0x121212, 0.070588, 0.070588, 0.070588),
|
||||
RawColor(GRAY8 , 0x141414, 0.078431, 0.078431, 0.078431),
|
||||
RawColor(GRAY9 , 0x171717, 0.090196, 0.090196, 0.090196),
|
||||
RawColor(GRAY10 , 0x1A1A1A, 0.101961, 0.101961, 0.101961),
|
||||
RawColor(GRAY11 , 0x1C1C1C, 0.109804, 0.109804, 0.109804),
|
||||
RawColor(GRAY12 , 0x1F1F1F, 0.121569, 0.121569, 0.121569),
|
||||
RawColor(GRAY13 , 0x212121, 0.129412, 0.129412, 0.129412),
|
||||
RawColor(GRAY14 , 0x242424, 0.141176, 0.141176, 0.141176),
|
||||
RawColor(GRAY15 , 0x262626, 0.149020, 0.149020, 0.149020),
|
||||
RawColor(GRAY16 , 0x292929, 0.160784, 0.160784, 0.160784),
|
||||
RawColor(GRAY17 , 0x2B2B2B, 0.168627, 0.168627, 0.168627),
|
||||
RawColor(GRAY18 , 0x2E2E2E, 0.180392, 0.180392, 0.180392),
|
||||
RawColor(GRAY19 , 0x303030, 0.188235, 0.188235, 0.188235),
|
||||
RawColor(GRAY20 , 0x333333, 0.200000, 0.200000, 0.200000),
|
||||
RawColor(GRAY21 , 0x363636, 0.211765, 0.211765, 0.211765),
|
||||
RawColor(GRAY22 , 0x383838, 0.219608, 0.219608, 0.219608),
|
||||
RawColor(GRAY23 , 0x3B3B3B, 0.231373, 0.231373, 0.231373),
|
||||
RawColor(GRAY24 , 0x3D3D3D, 0.239216, 0.239216, 0.239216),
|
||||
RawColor(GRAY25 , 0x404040, 0.250980, 0.250980, 0.250980),
|
||||
RawColor(GRAY26 , 0x424242, 0.258824, 0.258824, 0.258824),
|
||||
RawColor(GRAY27 , 0x454545, 0.270588, 0.270588, 0.270588),
|
||||
RawColor(GRAY28 , 0x474747, 0.278431, 0.278431, 0.278431),
|
||||
RawColor(GRAY29 , 0x4A4A4A, 0.290196, 0.290196, 0.290196),
|
||||
RawColor(GRAY30 , 0x4D4D4D, 0.301961, 0.301961, 0.301961),
|
||||
RawColor(GRAY31 , 0x4F4F4F, 0.309804, 0.309804, 0.309804),
|
||||
RawColor(GRAY32 , 0x525252, 0.321569, 0.321569, 0.321569),
|
||||
RawColor(GRAY33 , 0x545454, 0.329412, 0.329412, 0.329412),
|
||||
RawColor(GRAY34 , 0x575757, 0.341176, 0.341176, 0.341176),
|
||||
RawColor(GRAY35 , 0x595959, 0.349020, 0.349020, 0.349020),
|
||||
RawColor(GRAY36 , 0x5C5C5C, 0.360784, 0.360784, 0.360784),
|
||||
RawColor(GRAY37 , 0x5E5E5E, 0.368627, 0.368627, 0.368627),
|
||||
RawColor(GRAY38 , 0x616161, 0.380392, 0.380392, 0.380392),
|
||||
RawColor(GRAY39 , 0x636363, 0.388235, 0.388235, 0.388235),
|
||||
RawColor(GRAY40 , 0x666666, 0.400000, 0.400000, 0.400000),
|
||||
RawColor(GRAY41 , 0x696969, 0.411765, 0.411765, 0.411765),
|
||||
RawColor(GRAY42 , 0x6B6B6B, 0.419608, 0.419608, 0.419608),
|
||||
RawColor(GRAY43 , 0x6E6E6E, 0.431373, 0.431373, 0.431373),
|
||||
RawColor(GRAY44 , 0x707070, 0.439216, 0.439216, 0.439216),
|
||||
RawColor(GRAY45 , 0x737373, 0.450980, 0.450980, 0.450980),
|
||||
RawColor(GRAY46 , 0x757575, 0.458824, 0.458824, 0.458824),
|
||||
RawColor(GRAY47 , 0x787878, 0.470588, 0.470588, 0.470588),
|
||||
RawColor(GRAY48 , 0x7A7A7A, 0.478431, 0.478431, 0.478431),
|
||||
RawColor(GRAY49 , 0x7D7D7D, 0.490196, 0.490196, 0.490196),
|
||||
RawColor(GRAY50 , 0x7F7F7F, 0.498039, 0.498039, 0.498039),
|
||||
RawColor(GRAY51 , 0x828282, 0.509804, 0.509804, 0.509804),
|
||||
RawColor(GRAY52 , 0x858585, 0.521569, 0.521569, 0.521569),
|
||||
RawColor(GRAY53 , 0x878787, 0.529412, 0.529412, 0.529412),
|
||||
RawColor(GRAY54 , 0x8A8A8A, 0.541176, 0.541176, 0.541176),
|
||||
RawColor(GRAY55 , 0x8C8C8C, 0.549020, 0.549020, 0.549020),
|
||||
RawColor(GRAY56 , 0x8F8F8F, 0.560784, 0.560784, 0.560784),
|
||||
RawColor(GRAY57 , 0x919191, 0.568627, 0.568627, 0.568627),
|
||||
RawColor(GRAY58 , 0x949494, 0.580392, 0.580392, 0.580392),
|
||||
RawColor(GRAY59 , 0x969696, 0.588235, 0.588235, 0.588235),
|
||||
RawColor(GRAY60 , 0x999999, 0.600000, 0.600000, 0.600000),
|
||||
RawColor(GRAY61 , 0x9C9C9C, 0.611765, 0.611765, 0.611765),
|
||||
RawColor(GRAY62 , 0x9E9E9E, 0.619608, 0.619608, 0.619608),
|
||||
RawColor(GRAY63 , 0xA1A1A1, 0.631373, 0.631373, 0.631373),
|
||||
RawColor(GRAY64 , 0xA3A3A3, 0.639216, 0.639216, 0.639216),
|
||||
RawColor(GRAY65 , 0xA6A6A6, 0.650980, 0.650980, 0.650980),
|
||||
RawColor(GRAY66 , 0xA8A8A8, 0.658824, 0.658824, 0.658824),
|
||||
RawColor(GRAY67 , 0xABABAB, 0.670588, 0.670588, 0.670588),
|
||||
RawColor(GRAY68 , 0xADADAD, 0.678431, 0.678431, 0.678431),
|
||||
RawColor(GRAY69 , 0xB0B0B0, 0.690196, 0.690196, 0.690196),
|
||||
RawColor(GRAY70 , 0xB3B3B3, 0.701961, 0.701961, 0.701961),
|
||||
RawColor(GRAY71 , 0xB5B5B5, 0.709804, 0.709804, 0.709804),
|
||||
RawColor(GRAY72 , 0xB8B8B8, 0.721569, 0.721569, 0.721569),
|
||||
RawColor(GRAY73 , 0xBABABA, 0.729412, 0.729412, 0.729412),
|
||||
RawColor(GRAY74 , 0xBDBDBD, 0.741176, 0.741176, 0.741176),
|
||||
RawColor(GRAY75 , 0xBFBFBF, 0.749020, 0.749020, 0.749020),
|
||||
RawColor(GRAY76 , 0xC2C2C2, 0.760784, 0.760784, 0.760784),
|
||||
RawColor(GRAY77 , 0xC4C4C4, 0.768627, 0.768627, 0.768627),
|
||||
RawColor(GRAY78 , 0xC7C7C7, 0.780392, 0.780392, 0.780392),
|
||||
RawColor(GRAY79 , 0xC9C9C9, 0.788235, 0.788235, 0.788235),
|
||||
RawColor(GRAY80 , 0xCCCCCC, 0.800000, 0.800000, 0.800000),
|
||||
RawColor(GRAY81 , 0xCFCFCF, 0.811765, 0.811765, 0.811765),
|
||||
RawColor(GRAY82 , 0xD1D1D1, 0.819608, 0.819608, 0.819608),
|
||||
RawColor(GRAY83 , 0xD4D4D4, 0.831373, 0.831373, 0.831373),
|
||||
RawColor(GRAY85 , 0xD9D9D9, 0.850980, 0.850980, 0.850980),
|
||||
RawColor(GRAY86 , 0xDBDBDB, 0.858824, 0.858824, 0.858824),
|
||||
RawColor(GRAY87 , 0xDEDEDE, 0.870588, 0.870588, 0.870588),
|
||||
RawColor(GRAY88 , 0xE0E0E0, 0.878431, 0.878431, 0.878431),
|
||||
RawColor(GRAY89 , 0xE3E3E3, 0.890196, 0.890196, 0.890196),
|
||||
RawColor(GRAY90 , 0xE5E5E5, 0.898039, 0.898039, 0.898039),
|
||||
RawColor(GRAY91 , 0xE8E8E8, 0.909804, 0.909804, 0.909804),
|
||||
RawColor(GRAY92 , 0xEBEBEB, 0.921569, 0.921569, 0.921569),
|
||||
RawColor(GRAY93 , 0xEDEDED, 0.929412, 0.929412, 0.929412),
|
||||
RawColor(GRAY94 , 0xF0F0F0, 0.941176, 0.941176, 0.941176),
|
||||
RawColor(GRAY95 , 0xF2F2F2, 0.949020, 0.949020, 0.949020),
|
||||
RawColor(GRAY97 , 0xF7F7F7, 0.968627, 0.968627, 0.968627),
|
||||
RawColor(GRAY98 , 0xFAFAFA, 0.980392, 0.980392, 0.980392),
|
||||
RawColor(GRAY99 , 0xFCFCFC, 0.988235, 0.988235, 0.988235),
|
||||
RawColor(GREEN , 0x00FF00, 0.000000, 1.000000, 0.000000),
|
||||
RawColor(GREEN2 , 0x00EE00, 0.000000, 0.933333, 0.000000),
|
||||
RawColor(GREEN3 , 0x00CD00, 0.000000, 0.803922, 0.000000),
|
||||
RawColor(GREEN4 , 0x008B00, 0.000000, 0.545098, 0.000000),
|
||||
RawColor(GREENYELLOW , 0xADFF2F, 0.678431, 1.000000, 0.184314),
|
||||
RawColor(HONEYDEW , 0xF0FFF0, 0.941176, 1.000000, 0.941176),
|
||||
RawColor(HONEYDEW2 , 0xE0EEE0, 0.878431, 0.933333, 0.878431),
|
||||
RawColor(HONEYDEW3 , 0xC1CDC1, 0.756863, 0.803922, 0.756863),
|
||||
RawColor(HONEYDEW4 , 0x838B83, 0.513725, 0.545098, 0.513725),
|
||||
RawColor(HOTPINK , 0xFF69B4, 1.000000, 0.411765, 0.705882),
|
||||
RawColor(HOTPINK1 , 0xFF6EB4, 1.000000, 0.431373, 0.705882),
|
||||
RawColor(HOTPINK2 , 0xEE6AA7, 0.933333, 0.415686, 0.654902),
|
||||
RawColor(HOTPINK3 , 0xCD6090, 0.803922, 0.376471, 0.564706),
|
||||
RawColor(HOTPINK4 , 0x8B3A62, 0.545098, 0.227451, 0.384314),
|
||||
RawColor(INDIANRED , 0xCD5C5C, 0.803922, 0.360784, 0.360784),
|
||||
RawColor(INDIANRED1 , 0xFF6A6A, 1.000000, 0.415686, 0.415686),
|
||||
RawColor(INDIANRED2 , 0xEE6363, 0.933333, 0.388235, 0.388235),
|
||||
RawColor(INDIANRED3 , 0xCD5555, 0.803922, 0.333333, 0.333333),
|
||||
RawColor(INDIANRED4 , 0x8B3A3A, 0.545098, 0.227451, 0.227451),
|
||||
RawColor(IVORY , 0xFFFFF0, 1.000000, 1.000000, 0.941176),
|
||||
RawColor(IVORY2 , 0xEEEEE0, 0.933333, 0.933333, 0.878431),
|
||||
RawColor(IVORY3 , 0xCDCDC1, 0.803922, 0.803922, 0.756863),
|
||||
RawColor(IVORY4 , 0x8B8B83, 0.545098, 0.545098, 0.513725),
|
||||
RawColor(KHAKI , 0xF0E68C, 0.941176, 0.901961, 0.549020),
|
||||
RawColor(KHAKI1 , 0xFFF68F, 1.000000, 0.964706, 0.560784),
|
||||
RawColor(KHAKI2 , 0xEEE685, 0.933333, 0.901961, 0.521569),
|
||||
RawColor(KHAKI3 , 0xCDC673, 0.803922, 0.776471, 0.450980),
|
||||
RawColor(KHAKI4 , 0x8B864E, 0.545098, 0.525490, 0.305882),
|
||||
RawColor(LAVENDER , 0xE6E6FA, 0.901961, 0.901961, 0.980392),
|
||||
RawColor(LAVENDERBLUSH1 , 0xFFF0F5, 1.000000, 0.941176, 0.960784),
|
||||
RawColor(LAVENDERBLUSH2 , 0xEEE0E5, 0.933333, 0.878431, 0.898039),
|
||||
RawColor(LAVENDERBLUSH3 , 0xCDC1C5, 0.803922, 0.756863, 0.772549),
|
||||
RawColor(LAVENDERBLUSH4 , 0x8B8386, 0.545098, 0.513725, 0.525490),
|
||||
RawColor(LAWNGREEN , 0x7CFC00, 0.486275, 0.988235, 0.000000),
|
||||
RawColor(LEMONCHIFFON1 , 0xFFFACD, 1.000000, 0.980392, 0.803922),
|
||||
RawColor(LEMONCHIFFON2 , 0xEEE9BF, 0.933333, 0.913725, 0.749020),
|
||||
RawColor(LEMONCHIFFON3 , 0xCDC9A5, 0.803922, 0.788235, 0.647059),
|
||||
RawColor(LEMONCHIFFON4 , 0x8B8970, 0.545098, 0.537255, 0.439216),
|
||||
RawColor(LIGHTBLUE , 0xADD8E6, 0.678431, 0.847059, 0.901961),
|
||||
RawColor(LIGHTBLUE1 , 0xBFEFFF, 0.749020, 0.937255, 1.000000),
|
||||
RawColor(LIGHTBLUE2 , 0xB2DFEE, 0.698039, 0.874510, 0.933333),
|
||||
RawColor(LIGHTBLUE3 , 0x9AC0CD, 0.603922, 0.752941, 0.803922),
|
||||
RawColor(LIGHTBLUE4 , 0x68838B, 0.407843, 0.513725, 0.545098),
|
||||
RawColor(LIGHTCORAL , 0xF08080, 0.941176, 0.501961, 0.501961),
|
||||
RawColor(LIGHTCYAN , 0xE0FFFF, 0.878431, 1.000000, 1.000000),
|
||||
RawColor(LIGHTCYAN2 , 0xD1EEEE, 0.819608, 0.933333, 0.933333),
|
||||
RawColor(LIGHTCYAN3 , 0xB4CDCD, 0.705882, 0.803922, 0.803922),
|
||||
RawColor(LIGHTCYAN4 , 0x7A8B8B, 0.478431, 0.545098, 0.545098),
|
||||
RawColor(LIGHTGOLDENROD , 0xEEDD82, 0.933333, 0.866667, 0.509804),
|
||||
RawColor(LIGHTGOLDENROD1 , 0xFFEC8B, 1.000000, 0.925490, 0.545098),
|
||||
RawColor(LIGHTGOLDENROD2 , 0xEEDC82, 0.933333, 0.862745, 0.509804),
|
||||
RawColor(LIGHTGOLDENROD3 , 0xCDBE70, 0.803922, 0.745098, 0.439216),
|
||||
RawColor(LIGHTGOLDENROD4 , 0x8B814C, 0.545098, 0.505882, 0.298039),
|
||||
RawColor(LIGHTGOLDENRODYELLOW, 0xFAFAD2, 0.980392, 0.980392, 0.823529),
|
||||
RawColor(LIGHTGRAY , 0xD3D3D3, 0.827451, 0.827451, 0.827451),
|
||||
RawColor(LIGHTPINK , 0xFFB6C1, 1.000000, 0.713725, 0.756863),
|
||||
RawColor(LIGHTPINK1 , 0xFFAEB9, 1.000000, 0.682353, 0.725490),
|
||||
RawColor(LIGHTPINK2 , 0xEEA2AD, 0.933333, 0.635294, 0.678431),
|
||||
RawColor(LIGHTPINK3 , 0xCD8C95, 0.803922, 0.549020, 0.584314),
|
||||
RawColor(LIGHTPINK4 , 0x8B5F65, 0.545098, 0.372549, 0.396078),
|
||||
RawColor(LIGHTSALMON1 , 0xFFA07A, 1.000000, 0.627451, 0.478431),
|
||||
RawColor(LIGHTSALMON2 , 0xEE9572, 0.933333, 0.584314, 0.447059),
|
||||
RawColor(LIGHTSALMON3 , 0xCD8162, 0.803922, 0.505882, 0.384314),
|
||||
RawColor(LIGHTSALMON4 , 0x8B5742, 0.545098, 0.341176, 0.258824),
|
||||
RawColor(LIGHTSEAGREEN , 0x20B2AA, 0.125490, 0.698039, 0.666667),
|
||||
RawColor(LIGHTSKYBLUE , 0x87CEFA, 0.529412, 0.807843, 0.980392),
|
||||
RawColor(LIGHTSKYBLUE1 , 0xB0E2FF, 0.690196, 0.886275, 1.000000),
|
||||
RawColor(LIGHTSKYBLUE2 , 0xA4D3EE, 0.643137, 0.827451, 0.933333),
|
||||
RawColor(LIGHTSKYBLUE3 , 0x8DB6CD, 0.552941, 0.713725, 0.803922),
|
||||
RawColor(LIGHTSKYBLUE4 , 0x607B8B, 0.376471, 0.482353, 0.545098),
|
||||
RawColor(LIGHTSLATEBLUE , 0x8470FF, 0.517647, 0.439216, 1.000000),
|
||||
RawColor(LIGHTSLATEGRAY , 0x778899, 0.466667, 0.533333, 0.600000),
|
||||
RawColor(LIGHTSTEELBLUE , 0xB0C4DE, 0.690196, 0.768627, 0.870588),
|
||||
RawColor(LIGHTSTEELBLUE1 , 0xCAE1FF, 0.792157, 0.882353, 1.000000),
|
||||
RawColor(LIGHTSTEELBLUE2 , 0xBCD2EE, 0.737255, 0.823529, 0.933333),
|
||||
RawColor(LIGHTSTEELBLUE3 , 0xA2B5CD, 0.635294, 0.709804, 0.803922),
|
||||
RawColor(LIGHTSTEELBLUE4 , 0x6E7B8B, 0.431373, 0.482353, 0.545098),
|
||||
RawColor(LIGHTYELLOW , 0xFFFFE0, 1.000000, 1.000000, 0.878431),
|
||||
RawColor(LIGHTYELLOW2 , 0xEEEED1, 0.933333, 0.933333, 0.819608),
|
||||
RawColor(LIGHTYELLOW3 , 0xCDCDB4, 0.803922, 0.803922, 0.705882),
|
||||
RawColor(LIGHTYELLOW4 , 0x8B8B7A, 0.545098, 0.545098, 0.478431),
|
||||
RawColor(LIMEGREEN , 0x32CD32, 0.196078, 0.803922, 0.196078),
|
||||
RawColor(LINEN , 0xFAF0E6, 0.980392, 0.941176, 0.901961),
|
||||
RawColor(MAGENTA , 0xFF00FF, 1.000000, 0.000000, 1.000000),
|
||||
RawColor(MAGENTA2 , 0xEE00EE, 0.933333, 0.000000, 0.933333),
|
||||
RawColor(MAGENTA3 , 0xCD00CD, 0.803922, 0.000000, 0.803922),
|
||||
RawColor(MAGENTA4 , 0x8B008B, 0.545098, 0.000000, 0.545098),
|
||||
RawColor(MAROON , 0xB03060, 0.690196, 0.188235, 0.376471),
|
||||
RawColor(MAROON1 , 0xFF34B3, 1.000000, 0.203922, 0.701961),
|
||||
RawColor(MAROON2 , 0xEE30A7, 0.933333, 0.188235, 0.654902),
|
||||
RawColor(MAROON3 , 0xCD2990, 0.803922, 0.160784, 0.564706),
|
||||
RawColor(MAROON4 , 0x8B1C62, 0.545098, 0.109804, 0.384314),
|
||||
RawColor(MEDIUMAQUAMARINE , 0x66CDAA, 0.400000, 0.803922, 0.666667),
|
||||
RawColor(MEDIUMORCHID , 0xBA55D3, 0.729412, 0.333333, 0.827451),
|
||||
RawColor(MEDIUMORCHID1 , 0xE066FF, 0.878431, 0.400000, 1.000000),
|
||||
RawColor(MEDIUMORCHID2 , 0xD15FEE, 0.819608, 0.372549, 0.933333),
|
||||
RawColor(MEDIUMORCHID3 , 0xB452CD, 0.705882, 0.321569, 0.803922),
|
||||
RawColor(MEDIUMORCHID4 , 0x7A378B, 0.478431, 0.215686, 0.545098),
|
||||
RawColor(MEDIUMPURPLE , 0x9370DB, 0.576471, 0.439216, 0.858824),
|
||||
RawColor(MEDIUMPURPLE1 , 0xAB82FF, 0.670588, 0.509804, 1.000000),
|
||||
RawColor(MEDIUMPURPLE2 , 0x9F79EE, 0.623529, 0.474510, 0.933333),
|
||||
RawColor(MEDIUMPURPLE3 , 0x8968CD, 0.537255, 0.407843, 0.803922),
|
||||
RawColor(MEDIUMPURPLE4 , 0x5D478B, 0.364706, 0.278431, 0.545098),
|
||||
RawColor(MEDIUMSEAGREEN , 0x3CB371, 0.235294, 0.701961, 0.443137),
|
||||
RawColor(MEDIUMSLATEBLUE , 0x7B68EE, 0.482353, 0.407843, 0.933333),
|
||||
RawColor(MEDIUMSPRINGGREEN , 0x00FA9A, 0.000000, 0.980392, 0.603922),
|
||||
RawColor(MEDIUMTURQUOISE , 0x48D1CC, 0.282353, 0.819608, 0.800000),
|
||||
RawColor(MEDIUMVIOLETRED , 0xC71585, 0.780392, 0.082353, 0.521569),
|
||||
RawColor(MIDNIGHTBLUE , 0x191970, 0.098039, 0.098039, 0.439216),
|
||||
RawColor(MINTCREAM , 0xF5FFFA, 0.960784, 1.000000, 0.980392),
|
||||
RawColor(MISTYROSE , 0xFFE4E1, 1.000000, 0.894118, 0.882353),
|
||||
RawColor(MISTYROSE2 , 0xEED5D2, 0.933333, 0.835294, 0.823529),
|
||||
RawColor(MISTYROSE3 , 0xCDB7B5, 0.803922, 0.717647, 0.709804),
|
||||
RawColor(MISTYROSE4 , 0x8B7D7B, 0.545098, 0.490196, 0.482353),
|
||||
RawColor(MOCCASIN , 0xFFE4B5, 1.000000, 0.894118, 0.709804),
|
||||
RawColor(NAVAJOWHITE1 , 0xFFDEAD, 1.000000, 0.870588, 0.678431),
|
||||
RawColor(NAVAJOWHITE2 , 0xEECFA1, 0.933333, 0.811765, 0.631373),
|
||||
RawColor(NAVAJOWHITE3 , 0xCDB38B, 0.803922, 0.701961, 0.545098),
|
||||
RawColor(NAVAJOWHITE4 , 0x8B795E, 0.545098, 0.474510, 0.368627),
|
||||
RawColor(NAVYBLUE , 0x000080, 0.000000, 0.000000, 0.501961),
|
||||
RawColor(OLDLACE , 0xFDF5E6, 0.992157, 0.960784, 0.901961),
|
||||
RawColor(OLIVEDRAB , 0x6B8E23, 0.419608, 0.556863, 0.137255),
|
||||
RawColor(OLIVEDRAB1 , 0xC0FF3E, 0.752941, 1.000000, 0.243137),
|
||||
RawColor(OLIVEDRAB2 , 0xB3EE3A, 0.701961, 0.933333, 0.227451),
|
||||
RawColor(OLIVEDRAB3 , 0x9ACD32, 0.603922, 0.803922, 0.196078),
|
||||
RawColor(OLIVEDRAB4 , 0x698B22, 0.411765, 0.545098, 0.133333),
|
||||
RawColor(ORANGE , 0xFFA500, 1.000000, 0.647059, 0.000000),
|
||||
RawColor(ORANGE2 , 0xEE9A00, 0.933333, 0.603922, 0.000000),
|
||||
RawColor(ORANGE3 , 0xCD8500, 0.803922, 0.521569, 0.000000),
|
||||
RawColor(ORANGE4 , 0x8B5A00, 0.545098, 0.352941, 0.000000),
|
||||
RawColor(ORANGERED , 0xFF4500, 1.000000, 0.270588, 0.000000),
|
||||
RawColor(ORANGERED2 , 0xEE4000, 0.933333, 0.250980, 0.000000),
|
||||
RawColor(ORANGERED3 , 0xCD3700, 0.803922, 0.215686, 0.000000),
|
||||
RawColor(ORANGERED4 , 0x8B2500, 0.545098, 0.145098, 0.000000),
|
||||
RawColor(ORCHID , 0xDA70D6, 0.854902, 0.439216, 0.839216),
|
||||
RawColor(ORCHID1 , 0xFF83FA, 1.000000, 0.513725, 0.980392),
|
||||
RawColor(ORCHID2 , 0xEE7AE9, 0.933333, 0.478431, 0.913725),
|
||||
RawColor(ORCHID3 , 0xCD69C9, 0.803922, 0.411765, 0.788235),
|
||||
RawColor(ORCHID4 , 0x8B4789, 0.545098, 0.278431, 0.537255),
|
||||
RawColor(PALEGOLDENROD , 0xEEE8AA, 0.933333, 0.909804, 0.666667),
|
||||
RawColor(PALEGREEN , 0x98FB98, 0.596078, 0.984314, 0.596078),
|
||||
RawColor(PALEGREEN1 , 0x9AFF9A, 0.603922, 1.000000, 0.603922),
|
||||
RawColor(PALEGREEN2 , 0x90EE90, 0.564706, 0.933333, 0.564706),
|
||||
RawColor(PALEGREEN3 , 0x7CCD7C, 0.486275, 0.803922, 0.486275),
|
||||
RawColor(PALEGREEN4 , 0x548B54, 0.329412, 0.545098, 0.329412),
|
||||
RawColor(PALETURQUOISE , 0xAFEEEE, 0.686275, 0.933333, 0.933333),
|
||||
RawColor(PALETURQUOISE1 , 0xBBFFFF, 0.733333, 1.000000, 1.000000),
|
||||
RawColor(PALETURQUOISE2 , 0xAEEEEE, 0.682353, 0.933333, 0.933333),
|
||||
RawColor(PALETURQUOISE3 , 0x96CDCD, 0.588235, 0.803922, 0.803922),
|
||||
RawColor(PALETURQUOISE4 , 0x668B8B, 0.400000, 0.545098, 0.545098),
|
||||
RawColor(PALEVIOLETRED , 0xDB7093, 0.858824, 0.439216, 0.576471),
|
||||
RawColor(PALEVIOLETRED1 , 0xFF82AB, 1.000000, 0.509804, 0.670588),
|
||||
RawColor(PALEVIOLETRED2 , 0xEE799F, 0.933333, 0.474510, 0.623529),
|
||||
RawColor(PALEVIOLETRED3 , 0xCD6889, 0.803922, 0.407843, 0.537255),
|
||||
RawColor(PALEVIOLETRED4 , 0x8B475D, 0.545098, 0.278431, 0.364706),
|
||||
RawColor(PAPAYAWHIP , 0xFFEFD5, 1.000000, 0.937255, 0.835294),
|
||||
RawColor(PEACHPUFF , 0xFFDAB9, 1.000000, 0.854902, 0.725490),
|
||||
RawColor(PEACHPUFF2 , 0xEECBAD, 0.933333, 0.796078, 0.678431),
|
||||
RawColor(PEACHPUFF3 , 0xCDAF95, 0.803922, 0.686275, 0.584314),
|
||||
RawColor(PEACHPUFF4 , 0x8B7765, 0.545098, 0.466667, 0.396078),
|
||||
RawColor(PERU , 0xCD853F, 0.803922, 0.521569, 0.247059),
|
||||
RawColor(PINK , 0xFFC0CB, 1.000000, 0.752941, 0.796078),
|
||||
RawColor(PINK1 , 0xFFB5C5, 1.000000, 0.709804, 0.772549),
|
||||
RawColor(PINK2 , 0xEEA9B8, 0.933333, 0.662745, 0.721569),
|
||||
RawColor(PINK3 , 0xCD919E, 0.803922, 0.568627, 0.619608),
|
||||
RawColor(PINK4 , 0x8B636C, 0.545098, 0.388235, 0.423529),
|
||||
RawColor(PLUM , 0xDDA0DD, 0.866667, 0.627451, 0.866667),
|
||||
RawColor(PLUM1 , 0xFFBBFF, 1.000000, 0.733333, 1.000000),
|
||||
RawColor(PLUM2 , 0xEEAEEE, 0.933333, 0.682353, 0.933333),
|
||||
RawColor(PLUM3 , 0xCD96CD, 0.803922, 0.588235, 0.803922),
|
||||
RawColor(PLUM4 , 0x8B668B, 0.545098, 0.400000, 0.545098),
|
||||
RawColor(POWDERBLUE , 0xB0E0E6, 0.690196, 0.878431, 0.901961),
|
||||
RawColor(PURPLE , 0xA020F0, 0.627451, 0.125490, 0.941176),
|
||||
RawColor(PURPLE1 , 0x9B30FF, 0.607843, 0.188235, 1.000000),
|
||||
RawColor(PURPLE2 , 0x912CEE, 0.568627, 0.172549, 0.933333),
|
||||
RawColor(PURPLE3 , 0x7D26CD, 0.490196, 0.149020, 0.803922),
|
||||
RawColor(PURPLE4 , 0x551A8B, 0.333333, 0.101961, 0.545098),
|
||||
RawColor(RED , 0xFF0000, 1.000000, 0.000000, 0.000000),
|
||||
RawColor(RED2 , 0xEE0000, 0.933333, 0.000000, 0.000000),
|
||||
RawColor(RED3 , 0xCD0000, 0.803922, 0.000000, 0.000000),
|
||||
RawColor(RED4 , 0x8B0000, 0.545098, 0.000000, 0.000000),
|
||||
RawColor(ROSYBROWN , 0xBC8F8F, 0.737255, 0.560784, 0.560784),
|
||||
RawColor(ROSYBROWN1 , 0xFFC1C1, 1.000000, 0.756863, 0.756863),
|
||||
RawColor(ROSYBROWN2 , 0xEEB4B4, 0.933333, 0.705882, 0.705882),
|
||||
RawColor(ROSYBROWN3 , 0xCD9B9B, 0.803922, 0.607843, 0.607843),
|
||||
RawColor(ROSYBROWN4 , 0x8B6969, 0.545098, 0.411765, 0.411765),
|
||||
RawColor(ROYALBLUE , 0x4169E1, 0.254902, 0.411765, 0.882353),
|
||||
RawColor(ROYALBLUE1 , 0x4876FF, 0.282353, 0.462745, 1.000000),
|
||||
RawColor(ROYALBLUE2 , 0x436EEE, 0.262745, 0.431373, 0.933333),
|
||||
RawColor(ROYALBLUE3 , 0x3A5FCD, 0.227451, 0.372549, 0.803922),
|
||||
RawColor(ROYALBLUE4 , 0x27408B, 0.152941, 0.250980, 0.545098),
|
||||
RawColor(SADDLEBROWN , 0x8B4513, 0.545098, 0.270588, 0.074510),
|
||||
RawColor(SALMON , 0xFA8072, 0.980392, 0.501961, 0.447059),
|
||||
RawColor(SALMON1 , 0xFF8C69, 1.000000, 0.549020, 0.411765),
|
||||
RawColor(SALMON2 , 0xEE8262, 0.933333, 0.509804, 0.384314),
|
||||
RawColor(SALMON3 , 0xCD7054, 0.803922, 0.439216, 0.329412),
|
||||
RawColor(SALMON4 , 0x8B4C39, 0.545098, 0.298039, 0.223529),
|
||||
RawColor(SANDYBROWN , 0xF4A460, 0.956863, 0.643137, 0.376471),
|
||||
RawColor(SEAGREEN , 0x2E8B57, 0.180392, 0.545098, 0.341176),
|
||||
RawColor(SEAGREEN1 , 0x54FF9F, 0.329412, 1.000000, 0.623529),
|
||||
RawColor(SEAGREEN2 , 0x4EEE94, 0.305882, 0.933333, 0.580392),
|
||||
RawColor(SEAGREEN3 , 0x43CD80, 0.262745, 0.803922, 0.501961),
|
||||
RawColor(SEAGREEN4 , 0x2E8B57, 0.180392, 0.545098, 0.341176),
|
||||
RawColor(SEASHELL , 0xFFF5EE, 1.000000, 0.960784, 0.933333),
|
||||
RawColor(SEASHELL2 , 0xEEE5DE, 0.933333, 0.898039, 0.870588),
|
||||
RawColor(SEASHELL3 , 0xCDC5BF, 0.803922, 0.772549, 0.749020),
|
||||
RawColor(SEASHELL4 , 0x8B8682, 0.545098, 0.525490, 0.509804),
|
||||
RawColor(BEET , 0x8E388E, 0.556863, 0.219608, 0.556863),
|
||||
RawColor(TEAL , 0x388E8E, 0.219608, 0.556863, 0.556863),
|
||||
RawColor(SIENNA , 0xA0522D, 0.627451, 0.321569, 0.176471),
|
||||
RawColor(SIENNA1 , 0xFF8247, 1.000000, 0.509804, 0.278431),
|
||||
RawColor(SIENNA2 , 0xEE7942, 0.933333, 0.474510, 0.258824),
|
||||
RawColor(SIENNA3 , 0xCD6839, 0.803922, 0.407843, 0.223529),
|
||||
RawColor(SIENNA4 , 0x8B4726, 0.545098, 0.278431, 0.149020),
|
||||
RawColor(SKYBLUE , 0x87CEEB, 0.529412, 0.807843, 0.921569),
|
||||
RawColor(SKYBLUE1 , 0x87CEFF, 0.529412, 0.807843, 1.000000),
|
||||
RawColor(SKYBLUE2 , 0x7EC0EE, 0.494118, 0.752941, 0.933333),
|
||||
RawColor(SKYBLUE3 , 0x6CA6CD, 0.423529, 0.650980, 0.803922),
|
||||
RawColor(SKYBLUE4 , 0x4A708B, 0.290196, 0.439216, 0.545098),
|
||||
RawColor(SLATEBLUE , 0x6A5ACD, 0.415686, 0.352941, 0.803922),
|
||||
RawColor(SLATEBLUE1 , 0x836FFF, 0.513725, 0.435294, 1.000000),
|
||||
RawColor(SLATEBLUE2 , 0x7A67EE, 0.478431, 0.403922, 0.933333),
|
||||
RawColor(SLATEBLUE3 , 0x6959CD, 0.411765, 0.349020, 0.803922),
|
||||
RawColor(SLATEBLUE4 , 0x473C8B, 0.278431, 0.235294, 0.545098),
|
||||
RawColor(SLATEGRAY1 , 0xC6E2FF, 0.776471, 0.886275, 1.000000),
|
||||
RawColor(SLATEGRAY2 , 0xB9D3EE, 0.725490, 0.827451, 0.933333),
|
||||
RawColor(SLATEGRAY3 , 0x9FB6CD, 0.623529, 0.713725, 0.803922),
|
||||
RawColor(SLATEGRAY4 , 0x6C7B8B, 0.423529, 0.482353, 0.545098),
|
||||
RawColor(SLATEGRAY , 0x708090, 0.439216, 0.501961, 0.564706),
|
||||
RawColor(SNOW , 0xFFFAFA, 1.000000, 0.980392, 0.980392),
|
||||
RawColor(SNOW2 , 0xEEE9E9, 0.933333, 0.913725, 0.913725),
|
||||
RawColor(SNOW3 , 0xCDC9C9, 0.803922, 0.788235, 0.788235),
|
||||
RawColor(SNOW4 , 0x8B8989, 0.545098, 0.537255, 0.537255),
|
||||
RawColor(SPRINGGREEN , 0x00FF7F, 0.000000, 1.000000, 0.498039),
|
||||
RawColor(SPRINGGREEN2 , 0x00EE76, 0.000000, 0.933333, 0.462745),
|
||||
RawColor(SPRINGGREEN3 , 0x00CD66, 0.000000, 0.803922, 0.400000),
|
||||
RawColor(SPRINGGREEN4 , 0x008B45, 0.000000, 0.545098, 0.270588),
|
||||
RawColor(STEELBLUE , 0x4682B4, 0.274510, 0.509804, 0.705882),
|
||||
RawColor(STEELBLUE1 , 0x63B8FF, 0.388235, 0.721569, 1.000000),
|
||||
RawColor(STEELBLUE2 , 0x5CACEE, 0.360784, 0.674510, 0.933333),
|
||||
RawColor(STEELBLUE3 , 0x4F94CD, 0.309804, 0.580392, 0.803922),
|
||||
RawColor(STEELBLUE4 , 0x36648B, 0.211765, 0.392157, 0.545098),
|
||||
RawColor(TAN , 0xD2B48C, 0.823529, 0.705882, 0.549020),
|
||||
RawColor(TAN1 , 0xFFA54F, 1.000000, 0.647059, 0.309804),
|
||||
RawColor(TAN2 , 0xEE9A49, 0.933333, 0.603922, 0.286275),
|
||||
RawColor(TAN3 , 0xCD853F, 0.803922, 0.521569, 0.247059),
|
||||
RawColor(TAN4 , 0x8B5A2B, 0.545098, 0.352941, 0.168627),
|
||||
RawColor(THISTLE , 0xD8BFD8, 0.847059, 0.749020, 0.847059),
|
||||
RawColor(THISTLE1 , 0xFFE1FF, 1.000000, 0.882353, 1.000000),
|
||||
RawColor(THISTLE2 , 0xEED2EE, 0.933333, 0.823529, 0.933333),
|
||||
RawColor(THISTLE3 , 0xCDB5CD, 0.803922, 0.709804, 0.803922),
|
||||
RawColor(THISTLE4 , 0x8B7B8B, 0.545098, 0.482353, 0.545098),
|
||||
RawColor(TOMATO , 0xFF6347, 1.000000, 0.388235, 0.278431),
|
||||
RawColor(TOMATO2 , 0xEE5C42, 0.933333, 0.360784, 0.258824),
|
||||
RawColor(TOMATO3 , 0xCD4F39, 0.803922, 0.309804, 0.223529),
|
||||
RawColor(TOMATO4 , 0x8B3626, 0.545098, 0.211765, 0.149020),
|
||||
RawColor(TURQUOISE , 0x40E0D0, 0.250980, 0.878431, 0.815686),
|
||||
RawColor(TURQUOISE1 , 0x00F5FF, 0.000000, 0.960784, 1.000000),
|
||||
RawColor(TURQUOISE2 , 0x00E5EE, 0.000000, 0.898039, 0.933333),
|
||||
RawColor(TURQUOISE3 , 0x00C5CD, 0.000000, 0.772549, 0.803922),
|
||||
RawColor(TURQUOISE4 , 0x00868B, 0.000000, 0.525490, 0.545098),
|
||||
RawColor(VIOLET , 0xEE82EE, 0.933333, 0.509804, 0.933333),
|
||||
RawColor(VIOLETRED , 0xD02090, 0.815686, 0.125490, 0.564706),
|
||||
RawColor(VIOLETRED1 , 0xFF3E96, 1.000000, 0.243137, 0.588235),
|
||||
RawColor(VIOLETRED2 , 0xEE3A8C, 0.933333, 0.227451, 0.549020),
|
||||
RawColor(VIOLETRED3 , 0xCD3278, 0.803922, 0.196078, 0.470588),
|
||||
RawColor(VIOLETRED4 , 0x8B2252, 0.545098, 0.133333, 0.321569),
|
||||
RawColor(WHEAT , 0xF5DEB3, 0.960784, 0.870588, 0.701961),
|
||||
RawColor(WHEAT1 , 0xFFE7BA, 1.000000, 0.905882, 0.729412),
|
||||
RawColor(WHEAT2 , 0xEED8AE, 0.933333, 0.847059, 0.682353),
|
||||
RawColor(WHEAT3 , 0xCDBA96, 0.803922, 0.729412, 0.588235),
|
||||
RawColor(WHEAT4 , 0x8B7E66, 0.545098, 0.494118, 0.400000),
|
||||
RawColor(WHITESMOKE , 0xF5F5F5, 0.960784, 0.960784, 0.960784),
|
||||
RawColor(YELLOW , 0xFFFF00, 1.000000, 1.000000, 0.000000),
|
||||
RawColor(YELLOW2 , 0xEEEE00, 0.933333, 0.933333, 0.000000),
|
||||
RawColor(YELLOW3 , 0xCDCD00, 0.803922, 0.803922, 0.000000),
|
||||
RawColor(YELLOW4 , 0x8B8B00, 0.545098, 0.545098, 0.000000),
|
||||
RawColor(YELLOWGREEN , 0x9ACD32, 0.603922, 0.803922, 0.196078),
|
||||
RawColor(WHITE , 0xFFFFFF, 1.000000, 1.000000, 1.000000),
|
@ -43,7 +43,8 @@ Quantity_NOC_BISQUE2,
|
||||
Quantity_NOC_BISQUE3,
|
||||
Quantity_NOC_BISQUE4,
|
||||
Quantity_NOC_BLANCHEDALMOND,
|
||||
Quantity_NOC_BLUE1,
|
||||
Quantity_NOC_BLUE,
|
||||
Quantity_NOC_BLUE1 = Quantity_NOC_BLUE,
|
||||
Quantity_NOC_BLUE2,
|
||||
Quantity_NOC_BLUE3,
|
||||
Quantity_NOC_BLUE4,
|
||||
@ -64,7 +65,7 @@ Quantity_NOC_CADETBLUE2,
|
||||
Quantity_NOC_CADETBLUE3,
|
||||
Quantity_NOC_CADETBLUE4,
|
||||
Quantity_NOC_CHARTREUSE,
|
||||
Quantity_NOC_CHARTREUSE1,
|
||||
Quantity_NOC_CHARTREUSE1 = Quantity_NOC_CHARTREUSE,
|
||||
Quantity_NOC_CHARTREUSE2,
|
||||
Quantity_NOC_CHARTREUSE3,
|
||||
Quantity_NOC_CHARTREUSE4,
|
||||
@ -83,7 +84,8 @@ Quantity_NOC_CORNSILK1,
|
||||
Quantity_NOC_CORNSILK2,
|
||||
Quantity_NOC_CORNSILK3,
|
||||
Quantity_NOC_CORNSILK4,
|
||||
Quantity_NOC_CYAN1,
|
||||
Quantity_NOC_CYAN,
|
||||
Quantity_NOC_CYAN1 = Quantity_NOC_CYAN,
|
||||
Quantity_NOC_CYAN2,
|
||||
Quantity_NOC_CYAN3,
|
||||
Quantity_NOC_CYAN4,
|
||||
@ -145,7 +147,7 @@ Quantity_NOC_FORESTGREEN,
|
||||
Quantity_NOC_GAINSBORO,
|
||||
Quantity_NOC_GHOSTWHITE,
|
||||
Quantity_NOC_GOLD,
|
||||
Quantity_NOC_GOLD1,
|
||||
Quantity_NOC_GOLD1 = Quantity_NOC_GOLD,
|
||||
Quantity_NOC_GOLD2,
|
||||
Quantity_NOC_GOLD3,
|
||||
Quantity_NOC_GOLD4,
|
||||
@ -157,6 +159,14 @@ Quantity_NOC_GOLDENROD4,
|
||||
Quantity_NOC_GRAY,
|
||||
Quantity_NOC_GRAY0,
|
||||
Quantity_NOC_GRAY1,
|
||||
Quantity_NOC_GRAY2,
|
||||
Quantity_NOC_GRAY3,
|
||||
Quantity_NOC_GRAY4,
|
||||
Quantity_NOC_GRAY5,
|
||||
Quantity_NOC_GRAY6,
|
||||
Quantity_NOC_GRAY7,
|
||||
Quantity_NOC_GRAY8,
|
||||
Quantity_NOC_GRAY9,
|
||||
Quantity_NOC_GRAY10,
|
||||
Quantity_NOC_GRAY11,
|
||||
Quantity_NOC_GRAY12,
|
||||
@ -167,7 +177,6 @@ Quantity_NOC_GRAY16,
|
||||
Quantity_NOC_GRAY17,
|
||||
Quantity_NOC_GRAY18,
|
||||
Quantity_NOC_GRAY19,
|
||||
Quantity_NOC_GRAY2,
|
||||
Quantity_NOC_GRAY20,
|
||||
Quantity_NOC_GRAY21,
|
||||
Quantity_NOC_GRAY22,
|
||||
@ -178,7 +187,6 @@ Quantity_NOC_GRAY26,
|
||||
Quantity_NOC_GRAY27,
|
||||
Quantity_NOC_GRAY28,
|
||||
Quantity_NOC_GRAY29,
|
||||
Quantity_NOC_GRAY3,
|
||||
Quantity_NOC_GRAY30,
|
||||
Quantity_NOC_GRAY31,
|
||||
Quantity_NOC_GRAY32,
|
||||
@ -189,7 +197,6 @@ Quantity_NOC_GRAY36,
|
||||
Quantity_NOC_GRAY37,
|
||||
Quantity_NOC_GRAY38,
|
||||
Quantity_NOC_GRAY39,
|
||||
Quantity_NOC_GRAY4,
|
||||
Quantity_NOC_GRAY40,
|
||||
Quantity_NOC_GRAY41,
|
||||
Quantity_NOC_GRAY42,
|
||||
@ -200,7 +207,6 @@ Quantity_NOC_GRAY46,
|
||||
Quantity_NOC_GRAY47,
|
||||
Quantity_NOC_GRAY48,
|
||||
Quantity_NOC_GRAY49,
|
||||
Quantity_NOC_GRAY5,
|
||||
Quantity_NOC_GRAY50,
|
||||
Quantity_NOC_GRAY51,
|
||||
Quantity_NOC_GRAY52,
|
||||
@ -211,7 +217,6 @@ Quantity_NOC_GRAY56,
|
||||
Quantity_NOC_GRAY57,
|
||||
Quantity_NOC_GRAY58,
|
||||
Quantity_NOC_GRAY59,
|
||||
Quantity_NOC_GRAY6,
|
||||
Quantity_NOC_GRAY60,
|
||||
Quantity_NOC_GRAY61,
|
||||
Quantity_NOC_GRAY62,
|
||||
@ -222,7 +227,6 @@ Quantity_NOC_GRAY66,
|
||||
Quantity_NOC_GRAY67,
|
||||
Quantity_NOC_GRAY68,
|
||||
Quantity_NOC_GRAY69,
|
||||
Quantity_NOC_GRAY7,
|
||||
Quantity_NOC_GRAY70,
|
||||
Quantity_NOC_GRAY71,
|
||||
Quantity_NOC_GRAY72,
|
||||
@ -233,7 +237,6 @@ Quantity_NOC_GRAY76,
|
||||
Quantity_NOC_GRAY77,
|
||||
Quantity_NOC_GRAY78,
|
||||
Quantity_NOC_GRAY79,
|
||||
Quantity_NOC_GRAY8,
|
||||
Quantity_NOC_GRAY80,
|
||||
Quantity_NOC_GRAY81,
|
||||
Quantity_NOC_GRAY82,
|
||||
@ -243,22 +246,21 @@ Quantity_NOC_GRAY86,
|
||||
Quantity_NOC_GRAY87,
|
||||
Quantity_NOC_GRAY88,
|
||||
Quantity_NOC_GRAY89,
|
||||
Quantity_NOC_GRAY9,
|
||||
Quantity_NOC_GRAY90,
|
||||
Quantity_NOC_GRAY91,
|
||||
Quantity_NOC_GRAY92,
|
||||
Quantity_NOC_GRAY93,
|
||||
Quantity_NOC_GRAY94,
|
||||
Quantity_NOC_GRAY95,
|
||||
Quantity_NOC_GRAY97,
|
||||
Quantity_NOC_GRAY98,
|
||||
Quantity_NOC_GRAY99,
|
||||
Quantity_NOC_GREEN,
|
||||
Quantity_NOC_GREEN1,
|
||||
Quantity_NOC_GREEN1 = Quantity_NOC_GREEN,
|
||||
Quantity_NOC_GREEN2,
|
||||
Quantity_NOC_GREEN3,
|
||||
Quantity_NOC_GREEN4,
|
||||
Quantity_NOC_GREENYELLOW,
|
||||
Quantity_NOC_GRAY97,
|
||||
Quantity_NOC_GRAY98,
|
||||
Quantity_NOC_GRAY99,
|
||||
Quantity_NOC_HONEYDEW,
|
||||
Quantity_NOC_HONEYDEW2,
|
||||
Quantity_NOC_HONEYDEW3,
|
||||
@ -298,7 +300,8 @@ Quantity_NOC_LIGHTBLUE2,
|
||||
Quantity_NOC_LIGHTBLUE3,
|
||||
Quantity_NOC_LIGHTBLUE4,
|
||||
Quantity_NOC_LIGHTCORAL,
|
||||
Quantity_NOC_LIGHTCYAN1,
|
||||
Quantity_NOC_LIGHTCYAN,
|
||||
Quantity_NOC_LIGHTCYAN1 = Quantity_NOC_LIGHTCYAN,
|
||||
Quantity_NOC_LIGHTCYAN2,
|
||||
Quantity_NOC_LIGHTCYAN3,
|
||||
Quantity_NOC_LIGHTCYAN4,
|
||||
@ -337,7 +340,8 @@ Quantity_NOC_LIGHTYELLOW3,
|
||||
Quantity_NOC_LIGHTYELLOW4,
|
||||
Quantity_NOC_LIMEGREEN,
|
||||
Quantity_NOC_LINEN,
|
||||
Quantity_NOC_MAGENTA1,
|
||||
Quantity_NOC_MAGENTA,
|
||||
Quantity_NOC_MAGENTA1 = Quantity_NOC_MAGENTA,
|
||||
Quantity_NOC_MAGENTA2,
|
||||
Quantity_NOC_MAGENTA3,
|
||||
Quantity_NOC_MAGENTA4,
|
||||
@ -381,12 +385,12 @@ Quantity_NOC_OLIVEDRAB2,
|
||||
Quantity_NOC_OLIVEDRAB3,
|
||||
Quantity_NOC_OLIVEDRAB4,
|
||||
Quantity_NOC_ORANGE,
|
||||
Quantity_NOC_ORANGE1,
|
||||
Quantity_NOC_ORANGE1 = Quantity_NOC_ORANGE,
|
||||
Quantity_NOC_ORANGE2,
|
||||
Quantity_NOC_ORANGE3,
|
||||
Quantity_NOC_ORANGE4,
|
||||
Quantity_NOC_ORANGERED,
|
||||
Quantity_NOC_ORANGERED1,
|
||||
Quantity_NOC_ORANGERED1 = Quantity_NOC_ORANGERED,
|
||||
Quantity_NOC_ORANGERED2,
|
||||
Quantity_NOC_ORANGERED3,
|
||||
Quantity_NOC_ORANGERED4,
|
||||
@ -434,7 +438,7 @@ Quantity_NOC_PURPLE2,
|
||||
Quantity_NOC_PURPLE3,
|
||||
Quantity_NOC_PURPLE4,
|
||||
Quantity_NOC_RED,
|
||||
Quantity_NOC_RED1,
|
||||
Quantity_NOC_RED1 = Quantity_NOC_RED,
|
||||
Quantity_NOC_RED2,
|
||||
Quantity_NOC_RED3,
|
||||
Quantity_NOC_RED4,
|
||||
@ -510,7 +514,7 @@ Quantity_NOC_THISTLE2,
|
||||
Quantity_NOC_THISTLE3,
|
||||
Quantity_NOC_THISTLE4,
|
||||
Quantity_NOC_TOMATO,
|
||||
Quantity_NOC_TOMATO1,
|
||||
Quantity_NOC_TOMATO1 = Quantity_NOC_TOMATO,
|
||||
Quantity_NOC_TOMATO2,
|
||||
Quantity_NOC_TOMATO3,
|
||||
Quantity_NOC_TOMATO4,
|
||||
@ -532,7 +536,7 @@ Quantity_NOC_WHEAT3,
|
||||
Quantity_NOC_WHEAT4,
|
||||
Quantity_NOC_WHITESMOKE,
|
||||
Quantity_NOC_YELLOW,
|
||||
Quantity_NOC_YELLOW1,
|
||||
Quantity_NOC_YELLOW1 = Quantity_NOC_YELLOW,
|
||||
Quantity_NOC_YELLOW2,
|
||||
Quantity_NOC_YELLOW3,
|
||||
Quantity_NOC_YELLOW4,
|
||||
|
@ -17,19 +17,15 @@
|
||||
#ifndef _Quantity_TypeOfColor_HeaderFile
|
||||
#define _Quantity_TypeOfColor_HeaderFile
|
||||
|
||||
//! Identifies color definition systems
|
||||
//! - Quantity_TOC_RGB: with this system a
|
||||
//! color is defined by its quantities of red, green and blue (R-G-B values).
|
||||
//! - Quantity_TOC_HLS: with this system a
|
||||
//! color is defined by its hue angle and its
|
||||
//! lightness and saturation values (H-L-S values).
|
||||
//! A Quantity_Color object may define a color
|
||||
//! from three values R-G-B or H-L-S according
|
||||
//! to a given color definition system.
|
||||
//! Identifies color definition systems.
|
||||
enum Quantity_TypeOfColor
|
||||
{
|
||||
Quantity_TOC_RGB,
|
||||
Quantity_TOC_HLS
|
||||
Quantity_TOC_RGB, //!< normalized linear RGB (red, green, blue) values within range [0..1] for each component
|
||||
Quantity_TOC_HLS, //!< hue + light + saturation components, where:
|
||||
//! - First component is the Hue (H) angle in degrees within range [0.0; 360.0], 0.0 being Red;
|
||||
//! value -1.0 is a special value reserved for grayscale color (S should be 0.0).
|
||||
//! - Second component is the Lightness (L) within range [0.0; 1.0]
|
||||
//! - Third component is the Saturation (S) within range [0.0; 1.0]
|
||||
};
|
||||
|
||||
#endif // _Quantity_TypeOfColor_HeaderFile
|
||||
|
58
tests/3rdparty/fonts/A2
vendored
58
tests/3rdparty/fonts/A2
vendored
@ -16,54 +16,54 @@ vtrihedron trihedr
|
||||
vpoint p1 100 100 -400
|
||||
vpoint p2 000 000 -400
|
||||
vpoint p3 -100 -100 -400
|
||||
vdrawtext OC0 OpenCascade -pos 100 100 -400 -color 0.0 1.0 1.0 -halign left -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext OC1 OpenCascade -pos 000 000 -400 -color 0.0 1.0 1.0 -halign center -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext OC2 OpenCascade -pos -100 -100 -400 -color 0.0 1.0 1.0 -halign right -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext OC0 OpenCascade -pos 100 100 -400 -color CYAN -halign left -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext OC1 OpenCascade -pos 000 000 -400 -color CYAN -halign center -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext OC2 OpenCascade -pos -100 -100 -400 -color CYAN -halign right -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vpoint p4 100 100 -500
|
||||
vpoint p5 000 000 -500
|
||||
vpoint p6 -100 -100 -500
|
||||
vdrawtext OC3 OpenCascade -pos 100 100 -500 -color 1.0 0.0 0.0 -halign left -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext OC4 OpenCascade -pos 000 000 -500 -color 1.0 0.0 0.0 -halign center -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext OC5 OpenCascade -pos -100 -100 -500 -color 1.0 0.0 0.0 -halign right -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext OC3 OpenCascade -pos 100 100 -500 -color RED -halign left -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext OC4 OpenCascade -pos 000 000 -500 -color RED -halign center -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext OC5 OpenCascade -pos -100 -100 -500 -color RED -halign right -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vpoint p7 100 100 -450
|
||||
vpoint p8 000 000 -450
|
||||
vpoint p9 -100 -100 -450
|
||||
vdrawtext OC6 OpenCascade -pos 100 100 -450 -color 0.02 1.0 0.0 -halign left -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext OC7 OpenCascade -pos 000 000 -450 -color 0.02 1.0 0.0 -halign center -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext OC8 OpenCascade -pos -100 -100 -450 -color 0.02 1.0 0.0 -halign right -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext OC6 OpenCascade -pos 100 100 -450 -color 05FF00 -halign left -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext OC7 OpenCascade -pos 000 000 -450 -color 05FF00 -halign center -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext OC8 OpenCascade -pos -100 -100 -450 -color 05FF00 -halign right -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
|
||||
vdrawtext L0 _.Left._ -pos 200 200 200 -color 1.0 1.0 1.0 -halign left -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext L1 _.Left._ -pos 200 200 200 -color 1.0 1.0 0.0 -halign left -valign bottom -angle 090 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext L0 _.Left._ -pos 200 200 200 -color WHITE -halign left -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext L1 _.Left._ -pos 200 200 200 -color YELLOW -halign left -valign bottom -angle 090 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vdrawtext R0 _.Right._ -pos 200 200 200 -color 1.0 0.0 1.0 -halign right -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext R1 _.Right._ -pos 200 200 200 -color 1.0 0.6078 0.5882 -halign right -valign top -angle 090 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext R0 _.Right._ -pos 200 200 200 -color MAGENTA -halign right -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext R1 _.Right._ -pos 200 200 200 -color FF9B96 -halign right -valign top -angle 090 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vdrawtext N0 _.0123456789._ -pos 200 200 200 -color 0.0 0.0 1.0 -halign center -valign center -angle 045 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext N1 _.0123456789._ -pos 200 200 200 -color 1.0 0.0 0.0 -halign center -valign center -angle -45 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext N0 _.0123456789._ -pos 200 200 200 -color BLUE -halign center -valign center -angle 045 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext N1 _.0123456789._ -pos 200 200 200 -color RED -halign center -valign center -angle -45 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vdrawtext SS _.~!@#$%^&*:?|+-._ -pos -200 000 400 -color 1.0 0.0 0.0 -halign left -valign bottom -angle 0 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext SS _.~!@#$%^&*:?|+-._ -pos -200 000 400 -color RED -halign left -valign bottom -angle 0 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
box atextbox -100 -100 -100 -200 -200 -200
|
||||
vdisplay atextbox
|
||||
|
||||
vdrawtext OC9 OpenCascade -pos -300 -300 -300 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SerifFont
|
||||
vdrawtext OC10 OpenCascade -pos -300 -300 -100 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SerifFont
|
||||
vdrawtext OC11 OpenCascade -pos -100 -100 -300 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SerifFont
|
||||
vdrawtext OC12 OpenCascade -pos -100 -100 -100 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SerifFont
|
||||
vdrawtext OC9 OpenCascade -pos -300 -300 -300 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SerifFont
|
||||
vdrawtext OC10 OpenCascade -pos -300 -300 -100 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SerifFont
|
||||
vdrawtext OC11 OpenCascade -pos -100 -100 -300 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SerifFont
|
||||
vdrawtext OC12 OpenCascade -pos -100 -100 -100 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SerifFont
|
||||
|
||||
vdrawtext OC13 OpenCascade -pos -300 -100 -300 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SerifFont
|
||||
vdrawtext OC14 OpenCascade -pos -100 -300 -300 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SerifFont
|
||||
vdrawtext OC15 OpenCascade -pos -300 -100 -100 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SerifFont
|
||||
vdrawtext OC16 OpenCascade -pos -100 -300 -100 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SerifFont
|
||||
vdrawtext OC13 OpenCascade -pos -300 -100 -300 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SerifFont
|
||||
vdrawtext OC14 OpenCascade -pos -100 -300 -300 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SerifFont
|
||||
vdrawtext OC15 OpenCascade -pos -300 -100 -100 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SerifFont
|
||||
vdrawtext OC16 OpenCascade -pos -100 -300 -100 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font SerifFont
|
||||
|
||||
vdrawtext OC17 OpenCascade -pos -200 -200 100 -color 1.0 0.0 1.0 -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect regular -font sans-serif
|
||||
vdrawtext OC18 OpenCascade -pos -200 -200 150 -color 0.0 1.0 1.0 -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect regular -font serif
|
||||
vdrawtext OC19 OpenCascade -pos -200 -200 200 -color 1.0 1.0 0.0 -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect italic -font serif
|
||||
vdrawtext OC20 OpenCascade -pos -200 -200 250 -color 0.0 1.0 0.02 -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect bolditalic -font monospace
|
||||
vdrawtext OC21 OpenCascade -pos -200 -200 300 -color 1.0 0.0 0.02 -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect regular -font monospace
|
||||
vdrawtext OC17 OpenCascade -pos -200 -200 100 -color MAGENTA -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect regular -font sans-serif
|
||||
vdrawtext OC18 OpenCascade -pos -200 -200 150 -color CYAN -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect regular -font serif
|
||||
vdrawtext OC19 OpenCascade -pos -200 -200 200 -color YELLOW -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect italic -font serif
|
||||
vdrawtext OC20 OpenCascade -pos -200 -200 250 -color 00FF05 -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect bolditalic -font monospace
|
||||
vdrawtext OC21 OpenCascade -pos -200 -200 300 -color FF0005 -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect regular -font monospace
|
||||
|
||||
vglinfo
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
2
tests/3rdparty/fonts/A3
vendored
2
tests/3rdparty/fonts/A3
vendored
@ -17,7 +17,7 @@ vpoint p1 0 10000 -400
|
||||
vpoint p2 1000 0 -400
|
||||
vfit
|
||||
|
||||
vdrawtext text "$aText" -pos 100 100 -400 -color 0.0 1.0 1.0 -halign left -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext text "$aText" -pos 100 100 -400 -color CYAN -halign left -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vfps
|
||||
|
||||
|
2
tests/3rdparty/fonts/A4
vendored
2
tests/3rdparty/fonts/A4
vendored
@ -20,7 +20,7 @@ set data [split $aFileData "\n"]
|
||||
set aLineId 0
|
||||
foreach aLine $data {
|
||||
set aLineY [expr $aLineId * 400]
|
||||
vdrawtext "Line_$aLineId" "$aLine" -noupdate -pos 100 $aLineY -400 -color 0.0 1.0 1.0 -halign left -valign bottom -angle 000 -zoom 0 -height 20 -aspect regular -font SansFont
|
||||
vdrawtext "Line_$aLineId" "$aLine" -noupdate -pos 100 $aLineY -400 -color CYAN -halign left -valign bottom -angle 000 -zoom 0 -height 20 -aspect regular -font SansFont
|
||||
set aLineId [expr $aLineId + 1]
|
||||
}
|
||||
|
||||
|
18
tests/3rdparty/fonts/A5
vendored
18
tests/3rdparty/fonts/A5
vendored
@ -9,31 +9,31 @@ vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
vtrihedron trihedr
|
||||
|
||||
vpoint pTL -700 100 600
|
||||
vdrawtext Text0 "Top-Left\nFirst line\nLion The Second\n3rd" -pos -700 100 600 -color 0.0 1.0 1.0 -halign left -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext Text0 "Top-Left\nFirst line\nLion The Second\n3rd" -pos -700 100 600 -color CYAN -halign left -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vpoint pTC 0 100 600
|
||||
vdrawtext Text1 "Top-Center\nFirst line\nLion The Second\n3rd" -pos 0 100 600 -color 0.0 1.0 1.0 -halign center -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext Text1 "Top-Center\nFirst line\nLion The Second\n3rd" -pos 0 100 600 -color CYAN -halign center -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vpoint pTR 700 100 600
|
||||
vdrawtext Text2 "Top-Right\nFirst line\nLion The Second\n3rd" -pos 700 100 600 -color 0.0 1.0 1.0 -halign right -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext Text2 "Top-Right\nFirst line\nLion The Second\n3rd" -pos 700 100 600 -color CYAN -halign right -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vpoint pCL -700 100 -100
|
||||
vdrawtext Text3 "Center-Left\nFirst line\nLion The Second\n3rd" -pos -700 100 -100 -color 1.0 1.0 1.0 -halign left -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext Text3 "Center-Left\nFirst line\nLion The Second\n3rd" -pos -700 100 -100 -color WHITE -halign left -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vpoint pCC 0 100 -100
|
||||
vdrawtext Text4 "Center-Center\nFirst line\nLion The Second\n3rd" -pos 0 100 -100 -color 1.0 1.0 1.0 -halign center -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext Text4 "Center-Center\nFirst line\nLion The Second\n3rd" -pos 0 100 -100 -color WHITE -halign center -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vpoint pCR 700 100 -100
|
||||
vdrawtext Text5 "Center-Right\nFirst line\nLion The Second\n3rd" -pos 700 100 -100 -color 1.0 1.0 1.0 -halign right -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext Text5 "Center-Right\nFirst line\nLion The Second\n3rd" -pos 700 100 -100 -color WHITE -halign right -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vpoint pBL -700 100 -700
|
||||
vdrawtext Text6 "Bottom-Left\nFirst line\nLion The Second\n3rd" -pos -700 100 -700 -color 1.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext Text6 "Bottom-Left\nFirst line\nLion The Second\n3rd" -pos -700 100 -700 -color YELLOW -halign left -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vpoint pBC 0 100 -700
|
||||
vdrawtext Text7 "Bottom-Center\nFirst line\nLion The Second\n3rd" -pos 0 100 -700 -color 1.0 1.0 0.0 -halign center -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext Text7 "Bottom-Center\nFirst line\nLion The Second\n3rd" -pos 0 100 -700 -color YELLOW -halign center -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vpoint pBR 700 100 -700
|
||||
vdrawtext Text8 "Bottom-Right\nFirst line\nLion The Second\n3rd" -pos 700 100 -700 -color 1.0 1.0 0.0 -halign right -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext Text8 "Bottom-Right\nFirst line\nLion The Second\n3rd" -pos 700 100 -700 -color YELLOW -halign right -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vfit
|
||||
|
||||
|
18
tests/3rdparty/fonts/A6
vendored
18
tests/3rdparty/fonts/A6
vendored
@ -11,31 +11,31 @@ vfont -verbose 1
|
||||
vtrihedron trihedr
|
||||
|
||||
vpoint pTL -700 100 600
|
||||
vdrawtext Text0 " Top-Left\nFirst line \nLion The Second\n 3rd " -pos -700 100 600 -color 0.0 1.0 1.0 -halign left -valign top -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
vdrawtext Text0 " Top-Left\nFirst line \nLion The Second\n 3rd " -pos -700 100 600 -color CYAN -halign left -valign top -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
|
||||
vpoint pTC 0 100 600
|
||||
vdrawtext Text1 " Top-Center\nFirst line \nLion The Second\n 3rd " -pos 0 100 600 -color 0.0 1.0 1.0 -halign center -valign top -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
vdrawtext Text1 " Top-Center\nFirst line \nLion The Second\n 3rd " -pos 0 100 600 -color CYAN -halign center -valign top -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
|
||||
vpoint pTR 700 100 600
|
||||
vdrawtext Text2 " Top-Right\nFirst line \nLion The Second\n 3rd " -pos 700 100 600 -color 0.0 1.0 1.0 -halign right -valign top -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
vdrawtext Text2 " Top-Right\nFirst line \nLion The Second\n 3rd " -pos 700 100 600 -color CYAN -halign right -valign top -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
|
||||
vpoint pCL -700 100 -100
|
||||
vdrawtext Text3 " Center-Left\nFirst line \nLion The Second\n 3rd " -pos -700 100 -100 -color 1.0 1.0 1.0 -halign left -valign center -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
vdrawtext Text3 " Center-Left\nFirst line \nLion The Second\n 3rd " -pos -700 100 -100 -color WHITE -halign left -valign center -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
|
||||
vpoint pCC 0 100 -100
|
||||
vdrawtext Text4 " Center-Center\nFirst line \nLion The Second\n 3rd " -pos 0 100 -100 -color 1.0 1.0 1.0 -halign center -valign center -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
vdrawtext Text4 " Center-Center\nFirst line \nLion The Second\n 3rd " -pos 0 100 -100 -color WHITE -halign center -valign center -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
|
||||
vpoint pCR 700 100 -100
|
||||
vdrawtext Text5 " Center-Right\nFirst line \nLion The Second\n 3rd " -pos 700 100 -100 -color 1.0 1.0 1.0 -halign right -valign center -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
vdrawtext Text5 " Center-Right\nFirst line \nLion The Second\n 3rd " -pos 700 100 -100 -color WHITE -halign right -valign center -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
|
||||
vpoint pBL -700 100 -700
|
||||
vdrawtext Text6 " Bottom-Left\nFirst line \nLion The Second\n 3rd " -pos -700 100 -700 -color 1.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
vdrawtext Text6 " Bottom-Left\nFirst line \nLion The Second\n 3rd " -pos -700 100 -700 -color YELLOW -halign left -valign bottom -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
|
||||
vpoint pBC 0 100 -700
|
||||
vdrawtext Text7 " Bottom-Center\nFirst line \nLion The Second\n 3rd " -pos 0 100 -700 -color 1.0 1.0 0.0 -halign center -valign bottom -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
vdrawtext Text7 " Bottom-Center\nFirst line \nLion The Second\n 3rd " -pos 0 100 -700 -color YELLOW -halign center -valign bottom -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
|
||||
vpoint pBR 700 100 -700
|
||||
vdrawtext Text8 " Bottom-Right\nFirst line \nLion The Second\n 3rd " -pos 700 100 -700 -color 1.0 1.0 0.0 -halign right -valign bottom -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
vdrawtext Text8 " Bottom-Right\nFirst line \nLion The Second\n 3rd " -pos 700 100 -700 -color YELLOW -halign right -valign bottom -angle 000 -zoom 0 -height 14 -aspect bold -font $THE_FONT_NAME
|
||||
|
||||
vfit
|
||||
vfps
|
||||
|
2
tests/3rdparty/fonts/A7
vendored
2
tests/3rdparty/fonts/A7
vendored
@ -6,7 +6,7 @@ puts ""
|
||||
|
||||
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
|
||||
set aParams "-height 16 -font SansFont -2d -persPos -1 1 -subColor BLUE1"
|
||||
set aParams "-height 16 -font SansFont -2d -persPos -1 1 -subColor BLUE"
|
||||
|
||||
vclear
|
||||
vviewparams -scale 254.5 -proj 0.89 -0.37 0.26 -up -0.21 0.16 0.96 -at 0.69 1.05 1.46
|
||||
|
58
tests/3rdparty/fonts/A8
vendored
58
tests/3rdparty/fonts/A8
vendored
@ -14,54 +14,54 @@ vtrihedron trihedr
|
||||
vpoint p1 100 100 -400
|
||||
vpoint p2 000 000 -400
|
||||
vpoint p3 -100 -100 -400
|
||||
vdrawtext OC0 OpenCascade -pos 100 100 -400 -color 0.0 1.0 1.0 -halign left -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext OC1 OpenCascade -pos 000 000 -400 -color 0.0 1.0 1.0 -halign center -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext OC2 OpenCascade -pos -100 -100 -400 -color 0.0 1.0 1.0 -halign right -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext OC0 OpenCascade -pos 100 100 -400 -color CYAN -halign left -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext OC1 OpenCascade -pos 000 000 -400 -color CYAN -halign center -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext OC2 OpenCascade -pos -100 -100 -400 -color CYAN -halign right -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
|
||||
vpoint p4 100 100 -500
|
||||
vpoint p5 000 000 -500
|
||||
vpoint p6 -100 -100 -500
|
||||
vdrawtext OC3 OpenCascade -pos 100 100 -500 -color 1.0 0.0 0.0 -halign left -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext OC4 OpenCascade -pos 000 000 -500 -color 1.0 0.0 0.0 -halign center -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext OC5 OpenCascade -pos -100 -100 -500 -color 1.0 0.0 0.0 -halign right -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext OC3 OpenCascade -pos 100 100 -500 -color RED -halign left -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext OC4 OpenCascade -pos 000 000 -500 -color RED -halign center -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext OC5 OpenCascade -pos -100 -100 -500 -color RED -halign right -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
|
||||
vpoint p7 100 100 -450
|
||||
vpoint p8 000 000 -450
|
||||
vpoint p9 -100 -100 -450
|
||||
vdrawtext OC6 OpenCascade -pos 100 100 -450 -color 0.02 1.0 0.0 -halign left -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext OC7 OpenCascade -pos 000 000 -450 -color 0.02 1.0 0.0 -halign center -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext OC8 OpenCascade -pos -100 -100 -450 -color 0.02 1.0 0.0 -halign right -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext OC6 OpenCascade -pos 100 100 -450 -color 05FF00 -halign left -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext OC7 OpenCascade -pos 000 000 -450 -color 05FF00 -halign center -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext OC8 OpenCascade -pos -100 -100 -450 -color 05FF00 -halign right -valign center -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
|
||||
|
||||
vdrawtext L0 _.Left._ -pos 200 200 200 -color 1.0 1.0 1.0 -halign left -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext L1 _.Left._ -pos 200 200 200 -color 1.0 1.0 0.0 -halign left -valign bottom -angle 090 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext L0 _.Left._ -pos 200 200 200 -color WHITE -halign left -valign bottom -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext L1 _.Left._ -pos 200 200 200 -color YELLOW -halign left -valign bottom -angle 090 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
|
||||
vdrawtext R0 _.Right._ -pos 200 200 200 -color 1.0 0.0 1.0 -halign right -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext R1 _.Right._ -pos 200 200 200 -color 1.0 0.6078 0.5882 -halign right -valign top -angle 090 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext R0 _.Right._ -pos 200 200 200 -color MAGENTA -halign right -valign top -angle 000 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext R1 _.Right._ -pos 200 200 200 -color FF9B96 -halign right -valign top -angle 090 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
|
||||
vdrawtext N0 _.0123456789._ -pos 200 200 200 -color 0.0 0.0 1.0 -halign center -valign center -angle 045 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext N1 _.0123456789._ -pos 200 200 200 -color 1.0 0.0 0.0 -halign center -valign center -angle -45 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext N0 _.0123456789._ -pos 200 200 200 -color BLUE -halign center -valign center -angle 045 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext N1 _.0123456789._ -pos 200 200 200 -color RED -halign center -valign center -angle -45 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
|
||||
vdrawtext SS _.~!@#$%^&*:?|+-._ -pos -200 000 400 -color 1.0 0.0 0.0 -halign left -valign bottom -angle 0 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
vdrawtext SS _.~!@#$%^&*:?|+-._ -pos -200 000 400 -color RED -halign left -valign bottom -angle 0 -zoom 1 -height 50 -aspect regular -font Times-Roman
|
||||
|
||||
box atextbox -100 -100 -100 -200 -200 -200
|
||||
vdisplay atextbox
|
||||
|
||||
vdrawtext OC9 OpenCascade -pos -300 -300 -300 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
|
||||
vdrawtext OC10 OpenCascade -pos -300 -300 -100 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
|
||||
vdrawtext OC11 OpenCascade -pos -100 -100 -300 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
|
||||
vdrawtext OC12 OpenCascade -pos -100 -100 -100 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
|
||||
vdrawtext OC9 OpenCascade -pos -300 -300 -300 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
|
||||
vdrawtext OC10 OpenCascade -pos -300 -300 -100 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
|
||||
vdrawtext OC11 OpenCascade -pos -100 -100 -300 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
|
||||
vdrawtext OC12 OpenCascade -pos -100 -100 -100 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
|
||||
|
||||
vdrawtext OC13 OpenCascade -pos -300 -100 -300 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
|
||||
vdrawtext OC14 OpenCascade -pos -100 -300 -300 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
|
||||
vdrawtext OC15 OpenCascade -pos -300 -100 -100 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
|
||||
vdrawtext OC16 OpenCascade -pos -100 -300 -100 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
|
||||
vdrawtext OC13 OpenCascade -pos -300 -100 -300 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
|
||||
vdrawtext OC14 OpenCascade -pos -100 -300 -300 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
|
||||
vdrawtext OC15 OpenCascade -pos -300 -100 -100 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
|
||||
vdrawtext OC16 OpenCascade -pos -100 -300 -100 -color GREEN -halign left -valign bottom -angle 000 -zoom 0 -height 15 -aspect regular -font Courier
|
||||
|
||||
vdrawtext OC17 OpenCascade -pos -200 -200 100 -color 1.0 0.0 1.0 -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect regular -font Times-Roman
|
||||
vdrawtext OC18 OpenCascade -pos -200 -200 150 -color 0.0 1.0 1.0 -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect regular -font sans-serif
|
||||
vdrawtext OC19 OpenCascade -pos -200 -200 200 -color 1.0 1.0 0.0 -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect italic -font sans-serif
|
||||
vdrawtext OC20 OpenCascade -pos -200 -200 250 -color 0.0 1.0 0.02 -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect bolditalic -font sans-serif
|
||||
vdrawtext OC21 OpenCascade -pos -200 -200 300 -color 1.0 0.0 0.02 -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect regular -font Arial
|
||||
vdrawtext OC17 OpenCascade -pos -200 -200 100 -color MAGENTA -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect regular -font Times-Roman
|
||||
vdrawtext OC18 OpenCascade -pos -200 -200 150 -color CYAN -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect regular -font sans-serif
|
||||
vdrawtext OC19 OpenCascade -pos -200 -200 200 -color YELLOW -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect italic -font sans-serif
|
||||
vdrawtext OC20 OpenCascade -pos -200 -200 250 -color 00FF05 -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect bolditalic -font sans-serif
|
||||
vdrawtext OC21 OpenCascade -pos -200 -200 300 -color FF0005 -halign left -valign bottom -angle 010 -zoom 0 -height 15 -aspect regular -font Arial
|
||||
|
||||
vglinfo
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
2
tests/3rdparty/fonts/B1
vendored
2
tests/3rdparty/fonts/B1
vendored
@ -21,7 +21,7 @@ foreach aSize $THE_FONT_SIZES {
|
||||
set aText "\[$aSize\] $THE_TEXT"
|
||||
|
||||
vpoint aPnt_$aSize 0.0 $aLine 0.0
|
||||
vdrawtext "Line_$aLineId" $aText -pos 0.0 $aLine 0.0 -color 0.0 1.0 1.0 -halign left -valign top -angle 000 -zoom 1 -height $aSize -aspect bolditalic -font $THE_FONT_NAME
|
||||
vdrawtext "Line_$aLineId" $aText -pos 0.0 $aLine 0.0 -color CYAN -halign left -valign top -angle 000 -zoom 1 -height $aSize -aspect bolditalic -font $THE_FONT_NAME
|
||||
|
||||
text2brep aBText_$aSize $aText -font $THE_FONT_NAME -height $aSize -aspect bolditalic -composite off -pos 0.0 $aLine 0.0 -valign topfirstline
|
||||
vdisplay aBText_$aSize
|
||||
|
2
tests/3rdparty/fonts/B2
vendored
2
tests/3rdparty/fonts/B2
vendored
@ -21,7 +21,7 @@ foreach aSize $THE_FONT_SIZES {
|
||||
set aText "\[$aSize\] $THE_TEXT"
|
||||
|
||||
vpoint aPnt_$aSize 0.0 $aLine 0.0
|
||||
vdrawtext "Line_$aLineId" $aText -pos 0.0 $aLine 0.0 -color 0.0 1.0 1.0 -halign left -valign top -angle 000 -zoom 1 -height $aSize -aspect bolditalic -font $THE_FONT_NAME
|
||||
vdrawtext "Line_$aLineId" $aText -pos 0.0 $aLine 0.0 -color CYAN -halign left -valign top -angle 000 -zoom 1 -height $aSize -aspect bolditalic -font $THE_FONT_NAME
|
||||
|
||||
text2brep aBText_$aSize $aText -font $THE_FONT_NAME -height $aSize -aspect bolditalic -composite on -pos 0.0 $aLine 0.0 -valign topfirstline
|
||||
vdisplay aBText_$aSize
|
||||
|
6
tests/3rdparty/fonts/B4
vendored
6
tests/3rdparty/fonts/B4
vendored
@ -37,9 +37,9 @@ vpoint pBR 700 100 -700
|
||||
text2brep Text8 "Bottom-Right\nFirst line\nLion The Second\n3rd" -pos 700 100 -700 -halign right -valign bottom -height 50 -aspect regular -font Times-Roman -plane 0 -1 0 1 0 0
|
||||
|
||||
vdisplay Text0 Text1 Text2 Text3 Text4 Text5 Text6 Text7 Text8 -noupdate
|
||||
vsetcolor Text0 Text1 Text2 0 1 1
|
||||
vsetcolor Text3 Text4 Text5 1 1 1
|
||||
vsetcolor Text6 Text7 Text8 1 1 0
|
||||
vsetcolor Text0 Text1 Text2 CYAN
|
||||
vsetcolor Text3 Text4 Text5 WHITE
|
||||
vsetcolor Text6 Text7 Text8 YELLOW
|
||||
|
||||
vfit
|
||||
|
||||
|
6
tests/3rdparty/fonts/B5
vendored
6
tests/3rdparty/fonts/B5
vendored
@ -37,9 +37,9 @@ vpoint pBR 700 100 -700
|
||||
text2brep Text8 " Bottom-Right\nFirst line \nLion The Second\n 3rd " -pos 700 100 -700 -halign right -valign bottom -height 50 -aspect bold -font Arial -plane 0 -1 0 1 0 0
|
||||
|
||||
vdisplay Text0 Text1 Text2 Text3 Text4 Text5 Text6 Text7 Text8 -noupdate
|
||||
vsetcolor Text0 Text1 Text2 0 1 1
|
||||
vsetcolor Text3 Text4 Text5 1 1 1
|
||||
vsetcolor Text6 Text7 Text8 1 1 0
|
||||
vsetcolor Text0 Text1 Text2 CYAN
|
||||
vsetcolor Text3 Text4 Text5 WHITE
|
||||
vsetcolor Text6 Text7 Text8 YELLOW
|
||||
|
||||
vfit
|
||||
|
||||
|
2
tests/3rdparty/fonts/B7
vendored
2
tests/3rdparty/fonts/B7
vendored
@ -22,7 +22,7 @@ foreach aSize $THE_FONT_SIZES {
|
||||
set aText "\[$aSize\] $THE_TEXT"
|
||||
|
||||
vpoint aPnt_$aSize 0.0 $aLine 0.0
|
||||
vdrawtext "Line_$aLineId" $aText -pos 0.0 $aLine 0.0 -color 0.0 1.0 1.0 -halign left -valign top -angle 000 -zoom 1 -height $aSize -aspect bolditalic -font $THE_FONT_NAME
|
||||
vdrawtext "Line_$aLineId" $aText -pos 0.0 $aLine 0.0 -color CYAN -halign left -valign top -angle 000 -zoom 1 -height $aSize -aspect bolditalic -font $THE_FONT_NAME
|
||||
|
||||
text2brep aBText_$aSize $aText -font $THE_FONT_NAME -height $aSize -aspect bolditalic -composite off -pos 0.0 $aLine 0.0 -valign topfirstline
|
||||
vdisplay -dispMode 1 aBText_$aSize
|
||||
|
@ -31,8 +31,8 @@ AISSet D ${aLabel2} NS
|
||||
# Set shading mode
|
||||
vsetdispmode 1
|
||||
|
||||
# Set a color of the second shape as NOC_GREEN
|
||||
AISColor D ${aLabel2} 229
|
||||
# Set a color of the second shape
|
||||
AISColor D ${aLabel2} GREEN
|
||||
|
||||
# Display presentation of NamedShape in the viewer
|
||||
AISDisplay D ${aLabel1}
|
||||
|
@ -1,94 +0,0 @@
|
||||
puts "================"
|
||||
puts "OCC1030"
|
||||
puts "================"
|
||||
#
|
||||
# Note: Numerical control of setting color
|
||||
#
|
||||
|
||||
pload QAcommands
|
||||
|
||||
NewDocument D BinOcaf
|
||||
UndoLimit D 100
|
||||
NewCommand D
|
||||
|
||||
# Set NamedShape attribute
|
||||
box aBox1 100 200 300
|
||||
set aLabel 0:2
|
||||
SetShape D ${aLabel} aBox1
|
||||
|
||||
# Initialize 3D viewer
|
||||
AISInitViewer D
|
||||
|
||||
# Add AISPresentation attribute with parameter NS
|
||||
AISSet D ${aLabel} NS
|
||||
|
||||
# Display presentation of NamedShape in the viewer
|
||||
AISDisplay D ${aLabel}
|
||||
|
||||
# Close/Open transaction
|
||||
NewCommand D
|
||||
|
||||
set list [OCC1030_AISColor D ${aLabel}]
|
||||
set AISColor1 [lindex ${list} [expr [llength ${list}] - 1] ]
|
||||
|
||||
# Set a color of the shape as NOC_GREEN
|
||||
set GreenColor 229
|
||||
AISColor D ${aLabel} ${GreenColor}
|
||||
|
||||
set list [OCC1030_AISColor D ${aLabel}]
|
||||
set AISColor2 [lindex ${list} [expr [llength ${list}] - 1] ]
|
||||
|
||||
# Close/Open transaction
|
||||
NewCommand D
|
||||
|
||||
# Undo
|
||||
Undo D
|
||||
|
||||
# Update the viewer
|
||||
AISRepaint D
|
||||
|
||||
set list [OCC1030_AISColor D ${aLabel}]
|
||||
set AISColor3 [lindex ${list} [expr [llength ${list}] - 1] ]
|
||||
|
||||
# Redo
|
||||
Redo D
|
||||
|
||||
# Update the viewer
|
||||
AISRepaint D
|
||||
|
||||
set list [OCC1030_AISColor D ${aLabel}]
|
||||
set AISColor4 [lindex ${list} [expr [llength ${list}] - 1] ]
|
||||
|
||||
# Check the color
|
||||
puts "AISColor1 = ${AISColor1}"
|
||||
puts "AISColor2 = ${AISColor2}"
|
||||
puts "AISColor3 = ${AISColor3}"
|
||||
puts "AISColor4 = ${AISColor4}"
|
||||
|
||||
set DefaultAISColor 516
|
||||
set status 0
|
||||
if { ${AISColor1} != ${DefaultAISColor} } {
|
||||
puts "OCC1030_AISColor command: Error (case 1)"
|
||||
set status 1
|
||||
}
|
||||
|
||||
if { ${AISColor2} != ${GreenColor} } {
|
||||
puts "OCC1030_AISColor command: Error (case 2)"
|
||||
set status 1
|
||||
}
|
||||
|
||||
if { ${AISColor3} != ${DefaultAISColor} } {
|
||||
puts "OCC1030_AISColor command: Error (case 3)"
|
||||
set status 1
|
||||
}
|
||||
|
||||
if { ${AISColor4} != ${GreenColor} } {
|
||||
puts "OCC1030_AISColor command: Error (case 4)"
|
||||
set status 1
|
||||
}
|
||||
|
||||
if { ${status} == 0} {
|
||||
puts "OCC1030_AISColor command: OK"
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ vfit
|
||||
NewCommand D
|
||||
Undo D 1
|
||||
Redo D 1
|
||||
AISColor D $Lab1 11
|
||||
AISColor D $Lab1 AQUAMARINE4
|
||||
NewCommand D
|
||||
SaveAs D $imagedir/bug26290_new_1.cbf
|
||||
|
||||
@ -42,6 +42,6 @@ Open $imagedir/bug26290_new_1.cbf D
|
||||
AISInitViewer D
|
||||
vsetdispmode 1
|
||||
vfit
|
||||
AISColor D $Lab1 9
|
||||
AISColor D $Lab1 AQUAMARINE1
|
||||
AISErase D $Lab1
|
||||
Close D
|
||||
|
@ -25,7 +25,7 @@ vfit
|
||||
NewCommand D
|
||||
Undo D 1
|
||||
Redo D 1
|
||||
AISColor D $Lab1 11
|
||||
AISColor D $Lab1 AQUAMARINE4
|
||||
NewCommand D
|
||||
SaveAs D $imagedir/bug26290_new_1.cbf
|
||||
Close D
|
||||
@ -66,7 +66,7 @@ Open $imagedir/bug26290_new_2.cbf D
|
||||
AISInitViewer D
|
||||
vsetdispmode 1
|
||||
vfit
|
||||
AISColor D $Lab2 44
|
||||
AISColor D $Lab2 CHARTREUSE2
|
||||
AISErase D $Lab2
|
||||
AISErase D $Lab1
|
||||
AISUnset D $Lab2
|
||||
|
@ -14,7 +14,7 @@ XSetColor D s 0 0 1
|
||||
param write.iges.brep.mode 1
|
||||
WriteIges D ${imagedir}/OCC25518.igs
|
||||
ReadIges T ${imagedir}/OCC25518.igs
|
||||
if {[string trim [XGetAllColors T]] != "BLUE1"} {
|
||||
if {[string trim [XGetAllColors T]] != "BLUE"} {
|
||||
puts "ERROR: OCC25518 is reproduced. Color is lost."
|
||||
}
|
||||
XShow T
|
||||
|
@ -44,7 +44,7 @@ puts [checkshape result]
|
||||
# show compartments (solids) in shading with different colors
|
||||
set compartments [explode result so]
|
||||
set icol 0
|
||||
set colors {red green blue1 magenta1 yellow cyan1 brown}
|
||||
set colors {red green blue magenta yellow cyan brown}
|
||||
foreach s [lrange $compartments 1 end] {
|
||||
vdisplay $s
|
||||
vsetcolor $s [lindex $colors [expr [incr icol] % [llength $colors]]]
|
||||
|
@ -12,7 +12,7 @@ ReadStep D2 $imagedir/${casename}.stp
|
||||
# Blue
|
||||
set color1 [XGetShapeColor D1 0:1:1:1:1 s]
|
||||
set color2 [XGetShapeColor D2 0:1:1:1:1 s]
|
||||
if {$color1 != "BLUE1" || $color2 != "BLUE1"} {
|
||||
if {$color1 != "BLUE" || $color2 != "BLUE"} {
|
||||
puts "Error: wrong color."
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,6 @@ vinit
|
||||
puts "${BugNumber}"
|
||||
puts "Type=NONE, Color from RED to BLUE"
|
||||
|
||||
vbackground -gradient RED BLUE1 -gradientMode NONE
|
||||
vbackground -gradient RED BLUE -gradientMode NONE
|
||||
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
@ -10,6 +10,6 @@ vinit
|
||||
puts "${BugNumber}"
|
||||
puts "Type=CORNER1, Color from RED to BLUE, Direction from LEFT TOP CORNER"
|
||||
|
||||
vbackground -gradient RED BLUE1 -gradientMode CORNER1
|
||||
vbackground -gradient RED BLUE -gradientMode CORNER1
|
||||
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
@ -10,6 +10,6 @@ vinit
|
||||
puts "${BugNumber}"
|
||||
puts "Type=CORNER2, Color from RED to BLUE, Direction from RIGHT TOP CORNER"
|
||||
|
||||
vbackground -gradient RED BLUE1 -gradientMode CORNER2
|
||||
vbackground -gradient RED BLUE -gradientMode CORNER2
|
||||
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
@ -10,6 +10,6 @@ vinit
|
||||
puts "${BugNumber}"
|
||||
puts "Type=CORNER3, Color from RED to BLUE, Direction from RIGHT BOTTOM CORNER"
|
||||
|
||||
vbackground -gradient RED BLUE1 -gradientMode CORNER3
|
||||
vbackground -gradient RED BLUE -gradientMode CORNER3
|
||||
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
@ -10,6 +10,6 @@ vinit
|
||||
puts "${BugNumber}"
|
||||
puts "Type=CORNER4, Color from RED to BLUE, Direction from LEFT BOTTOM CORNER"
|
||||
|
||||
vbackground -gradient RED BLUE1 -gradientMode CORNER4
|
||||
vbackground -gradient RED BLUE -gradientMode CORNER4
|
||||
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
@ -10,6 +10,6 @@ vinit
|
||||
puts "${BugNumber}"
|
||||
puts "Type=CORNER1, Color from BLUE to RED, Direction from LEFT TOP CORNER"
|
||||
|
||||
vbackground -gradient BLUE1 RED -gradientMode CORNER1
|
||||
vbackground -gradient BLUE RED -gradientMode CORNER1
|
||||
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
@ -10,6 +10,6 @@ vinit
|
||||
puts "${BugNumber}"
|
||||
puts "Type=CORNER2, Color from BLUE to RED, Direction from RIGHT TOP CORNER"
|
||||
|
||||
vbackground -gradient BLUE1 RED -gradientMode CORNER2
|
||||
vbackground -gradient BLUE RED -gradientMode CORNER2
|
||||
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
@ -10,6 +10,6 @@ vinit
|
||||
puts "${BugNumber}"
|
||||
puts "Type=CORNER3, Color from BLUE to RED, Direction from RIGHT BOTTOM CORNER"
|
||||
|
||||
vbackground -gradient BLUE1 RED -gradientMode CORNER3
|
||||
vbackground -gradient BLUE RED -gradientMode CORNER3
|
||||
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
@ -10,6 +10,6 @@ vinit
|
||||
puts "${BugNumber}"
|
||||
puts "Type=CORNER4, Color from BLUE to RED, Direction from LEFT BOTTOM CORNER"
|
||||
|
||||
vbackground -gradient BLUE1 RED -gradientMode CORNER4
|
||||
vbackground -gradient BLUE RED -gradientMode CORNER4
|
||||
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
@ -11,6 +11,6 @@ vinit
|
||||
puts "${BugNumber}"
|
||||
puts "Type=HORIZONTAL, Color from RED to BLUE, Direction from LEFT to RIGHT"
|
||||
|
||||
vbackground -gradient RED BLUE1 -gradientMode HORIZONTAL
|
||||
vbackground -gradient RED BLUE -gradientMode HORIZONTAL
|
||||
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
@ -10,6 +10,6 @@ vinit
|
||||
puts "${BugNumber}"
|
||||
puts "Type=HORIZONTAL, Color from BLUE to RED, Direction from LEFT to RIGHT"
|
||||
|
||||
vbackground -gradient BLUE1 RED -gradientMode HORIZONTAL
|
||||
vbackground -gradient BLUE RED -gradientMode HORIZONTAL
|
||||
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
@ -10,6 +10,6 @@ vinit
|
||||
puts "${BugNumber}"
|
||||
puts "Type=VERTICAL, Color from RED to BLUE, Direction from TOP to BOTTOM"
|
||||
|
||||
vbackground -gradient RED BLUE1 -gradientMode VERTICAL
|
||||
vbackground -gradient RED BLUE -gradientMode VERTICAL
|
||||
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
@ -10,6 +10,6 @@ vinit
|
||||
puts "${BugNumber}"
|
||||
puts "Type=VERTICAL, Color from BLUE to RED, Direction from TOP to BOTTOM"
|
||||
|
||||
vbackground -gradient BLUE1 RED -gradientMode VERTICAL
|
||||
vbackground -gradient BLUE RED -gradientMode VERTICAL
|
||||
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
@ -10,6 +10,6 @@ vinit
|
||||
puts "${BugNumber}"
|
||||
puts "Type=DIAGONAL1, Color from RED to BLUE, Direction from LEFT TOP CORNER to RIGHT BOTTOM CORNER"
|
||||
|
||||
vbackground -gradient RED BLUE1 -gradientMode DIAGONAL1
|
||||
vbackground -gradient RED BLUE -gradientMode DIAGONAL1
|
||||
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
@ -10,6 +10,6 @@ vinit
|
||||
puts "${BugNumber}"
|
||||
puts "Type=DIAGONAL1, Color from BLUE to RED, Direction from LEFT TOP CORNER to RIGHT BOTTOM CORNER"
|
||||
|
||||
vbackground -gradient BLUE1 RED -gradientMode DIAGONAL1
|
||||
vbackground -gradient BLUE RED -gradientMode DIAGONAL1
|
||||
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
@ -10,6 +10,6 @@ vinit
|
||||
puts "${BugNumber}"
|
||||
puts "Type=DIAGONAL2, Color from RED to BLUE, Direction from RIGHT TOP CORNER to LEFT BOTTOM CORNER"
|
||||
|
||||
vbackground -gradient RED BLUE1 -gradientMode DIAGONAL2
|
||||
vbackground -gradient RED BLUE -gradientMode DIAGONAL2
|
||||
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
@ -10,6 +10,6 @@ vinit
|
||||
puts "${BugNumber}"
|
||||
puts "Type=DIAGONAL2, Color from BLUE to RED, Direction from RIGHT TOP CORNER to LEFT BOTTOM CORNER"
|
||||
|
||||
vbackground -gradient BLUE1 RED -gradientMode DIAGONAL2
|
||||
vbackground -gradient BLUE RED -gradientMode DIAGONAL2
|
||||
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
@ -11,9 +11,9 @@ vfont add [locate_data_file bug22149_mona.ttf] Mona
|
||||
vclear
|
||||
vinit View1
|
||||
vaxo
|
||||
vdrawtext text0 HELLO -pos 0 0 0 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 0 -zoom 0 -height 50 -aspect regular
|
||||
vdrawtext text1 [encoding convertfrom unicode \x42\x30] -pos 0 0 200 -color 1.0 0.0 0.0 -halign left -valign bottom -angle 0 -zoom 0 -height 50 -aspect regular -font Mona
|
||||
vdrawtext text2 [encoding convertfrom unicode \x42\x30] -pos 0 0 400 -color 0.0 0.0 1.0 -halign left -valign bottom -angle 0 -zoom 0 -height 50 -aspect regular -font cjk
|
||||
vdrawtext text3 [encoding convertfrom unicode \x5C\xD5\x6D\xAD\xB4\xC5] -pos 0 0 -200 -color 1.0 0.0 1.0 -halign left -valign bottom -angle 0 -zoom 0 -height 50 -aspect regular -font korean
|
||||
vdrawtext text0 HELLO -pos 0 0 0 -color GREEN -halign left -valign bottom -angle 0 -zoom 0 -height 50 -aspect regular
|
||||
vdrawtext text1 [encoding convertfrom unicode \x42\x30] -pos 0 0 200 -color RED -halign left -valign bottom -angle 0 -zoom 0 -height 50 -aspect regular -font Mona
|
||||
vdrawtext text2 [encoding convertfrom unicode \x42\x30] -pos 0 0 400 -color BLUE -halign left -valign bottom -angle 0 -zoom 0 -height 50 -aspect regular -font cjk
|
||||
vdrawtext text3 [encoding convertfrom unicode \x5C\xD5\x6D\xAD\xB4\xC5] -pos 0 0 -200 -color MAGENTA -halign left -valign bottom -angle 0 -zoom 0 -height 50 -aspect regular -font korean
|
||||
|
||||
vdump $imagedir/${casename}.png
|
||||
|
@ -11,7 +11,7 @@ vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
set BugNumber OCC22796
|
||||
|
||||
vinit
|
||||
vdrawtext text0 "MyTest1\rHello,\tWor\vld!\nMyTest2\t\a\bMyTest3" -pos 0 0 0 -color 1.0 1.0 1.0 -halign left -valign bottom -angle 0 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext text0 "MyTest1\rHello,\tWor\vld!\nMyTest2\t\a\bMyTest3" -pos 0 0 0 -color WHITE -halign left -valign bottom -angle 0 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
||||
|
@ -11,8 +11,7 @@ set BugNumber OCC22796
|
||||
vinit
|
||||
vfont add [locate_data_file bug22149_mona.ttf] Mona
|
||||
set s [encoding convertfrom unicode "\x42\x30\x09\x00\x79\x30\x0A\x00\x6F\x30\x42\x26"]
|
||||
#vdrawtext "\x30\x42\x00\x09\x30\x79\x00\x0A\x30\x6F" 0 0 0 255 255 255 0 0 0 1 50 0 Mona 1
|
||||
vdrawtext text0 $s -pos 0 0 0 -color 1.0 1.0 1.0 -halign left -valign bottom -angle 0 -zoom 1 -height 50 -aspect regular -font Mona
|
||||
vdrawtext text0 $s -pos 0 0 0 -color WHITE -halign left -valign bottom -angle 0 -zoom 1 -height 50 -aspect regular -font Mona
|
||||
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
||||
|
@ -12,13 +12,13 @@ set BugNumber OCC22879
|
||||
|
||||
vinit
|
||||
|
||||
vdrawtext t1 "Text Height=14" -2d -perspos -1 1 -pos 10 -10 0 -height 14 -color 1 1 1 -font SansFont
|
||||
vdrawtext t2 "Text Height=25" -2d -perspos -1 1 -pos 10 -40 0 -height 25 -color 1 1 1 -font SansFont
|
||||
vdrawtext t3 "Arial" -2d -perspos -1 1 -pos 10 -60 0 -height 18 -font SansFont -color 1 0 0
|
||||
vdrawtext t4 "Times New Roman" -2d -perspos -1 1 -pos 10 -80 0 -height 18 -font SansFont -color 0 0 1
|
||||
vdrawtext t5 "Subtitle" -2d -perspos -1 1 -pos 10 -110 0 -height 20 -font SansFont -color 0 1 0 -disptype subtitle -subcolor 0.3 0.3 0.3
|
||||
vdrawtext t6 "Decal" -2d -perspos -1 1 -pos 10 -140 0 -height 20 -font SansFont -color 0 0 1 -disptype decal -subcolor 1 0 0
|
||||
vdrawtext t7 "Blend" -2d -perspos -1 1 -pos 10 -170 0 -height 20 -font SansFont -color 1 0 0 -disptype blend
|
||||
vdrawtext t1 "Text Height=14" -2d -perspos -1 1 -pos 10 -10 0 -height 14 -color WHITE -font SansFont
|
||||
vdrawtext t2 "Text Height=25" -2d -perspos -1 1 -pos 10 -40 0 -height 25 -color WHITE -font SansFont
|
||||
vdrawtext t3 "Arial" -2d -perspos -1 1 -pos 10 -60 0 -height 18 -font SansFont -color RED
|
||||
vdrawtext t4 "Times New Roman" -2d -perspos -1 1 -pos 10 -80 0 -height 18 -font SansFont -color BLUE
|
||||
vdrawtext t5 "Subtitle" -2d -perspos -1 1 -pos 10 -110 0 -height 20 -font SansFont -color GREEN -disptype subtitle -subcolor 0.3 0.3 0.3
|
||||
vdrawtext t6 "Decal" -2d -perspos -1 1 -pos 10 -140 0 -height 20 -font SansFont -color BLUE -disptype decal -subcolor 1 0 0
|
||||
vdrawtext t7 "Blend" -2d -perspos -1 1 -pos 10 -170 0 -height 20 -font SansFont -color RED -disptype blend
|
||||
box b 50 -700 450 50 50 50
|
||||
vdisplay b
|
||||
vsetdispmode 1
|
||||
|
@ -21,7 +21,7 @@ set x4 87
|
||||
set y4 232
|
||||
|
||||
vinit
|
||||
vbackground -gradient RED BLUE1 -gradientMode DIAGONAL2
|
||||
vbackground -gradient RED BLUE -gradientMode DIAGONAL2
|
||||
set Color1 [vreadpixel ${x1} ${y1} rgb]
|
||||
set Color2 [vreadpixel ${x2} ${y2} rgb]
|
||||
set Color3 [vreadpixel ${x3} ${y3} rgb]
|
||||
|
@ -6,7 +6,7 @@ puts ""
|
||||
vclear
|
||||
vinit View1
|
||||
vaxo
|
||||
vbackground -gradient 0.980392 0 0 GREEN -gradientMode VERTICAL
|
||||
vbackground -gradient FA0000 GREEN -gradientMode VERTICAL
|
||||
pcylinder p 100 200
|
||||
vdisplay -dispMode 1 p
|
||||
vaspects p -setInteriorStyle HOLLOW -setDrawEdges 1
|
||||
|
@ -10,8 +10,8 @@ vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
|
||||
vinit
|
||||
vtrihedron tri
|
||||
vdrawtext text0 Default -pos 0.0 0.0 0.0 -color 1.0 1.0 1.0 -halign left -valign bottom -angle 0 -zoom 1 -height 20 -aspect regular -font SansFont
|
||||
vdrawtext text1 Right_Align -pos 0.0 0.0 0.0 -color 1.0 1.0 1.0 -halign right -valign bottom -angle 0 -zoom 1 -height 20 -aspect regular -font SansFont
|
||||
vdrawtext text0 Default -pos 0.0 0.0 0.0 -color WHITE -halign left -valign bottom -angle 0 -zoom 1 -height 20 -aspect regular -font SansFont
|
||||
vdrawtext text1 Right_Align -pos 0.0 0.0 0.0 -color WHITE -halign right -valign bottom -angle 0 -zoom 1 -height 20 -aspect regular -font SansFont
|
||||
|
||||
set scale 3.1783114563761763
|
||||
set proj_X 0.57735025882720947
|
||||
|
@ -18,7 +18,7 @@ vfit
|
||||
|
||||
vaspects -setwidth 5
|
||||
vmoveto 204 205
|
||||
if { "[vreadpixel 204 205 rgb name]" != "CYAN1" } {
|
||||
if { "[vreadpixel 204 205 rgb name]" != "CYAN" } {
|
||||
puts "Error : Erased object is not displayed after its removing."
|
||||
}
|
||||
|
||||
|
@ -11,9 +11,9 @@ vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
vinit
|
||||
vclear
|
||||
vaxo
|
||||
vdrawtext text0 "This program" -pos 0 0 0 -color 0.0 1.0 0.0 -halign left -valign bottom -angle 0 -zoom 0 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext text0 "This program" -pos 0 0 0 -color GREEN -halign left -valign bottom -angle 0 -zoom 0 -height 50 -aspect regular -font SansFont
|
||||
|
||||
vdrawtext text1 "This program" -pos 0 0 0 -color 1.0 0.0 0.0 -halign left -valign bottom -angle 0 -zoom 0 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext text1 "This program" -pos 0 0 0 -color RED -halign left -valign bottom -angle 0 -zoom 0 -height 50 -aspect regular -font SansFont
|
||||
|
||||
set x 346
|
||||
set y 190
|
||||
|
@ -25,7 +25,7 @@ vtop
|
||||
|
||||
vaspects -setwidth 5
|
||||
vmoveto 200 200
|
||||
if { "[vreadpixel 200 200 rgb name]" != "CYAN1" } {
|
||||
if { "[vreadpixel 200 200 rgb name]" != "CYAN" } {
|
||||
puts "Error : The box is not selectable!"
|
||||
}
|
||||
|
||||
@ -34,6 +34,6 @@ vaxo
|
||||
vfit
|
||||
|
||||
vmoveto 200 200
|
||||
if { "[vreadpixel 199 200 rgb name]" != "CYAN1" } {
|
||||
if { "[vreadpixel 199 200 rgb name]" != "CYAN" } {
|
||||
puts "Error : The box is not selectable!"
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ vviewparams -size 22
|
||||
|
||||
vaspects -setwidth 5
|
||||
vmoveto 200 100
|
||||
if { "[vreadpixel 200 9 rgb name]" != "CYAN1" } {
|
||||
if { "[vreadpixel 200 9 rgb name]" != "CYAN" } {
|
||||
puts "Error : the view projection size is incorrect!"
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ vclipplane change pln1 equation 0 1 0 0
|
||||
vfit
|
||||
vaspects -setwidth 5
|
||||
|
||||
if { "[vreadpixel $check_x $check_y rgb name]" != "CYAN1" } {
|
||||
if { "[vreadpixel $check_x $check_y rgb name]" != "CYAN" } {
|
||||
puts "Error : Viewer clipping is broken."
|
||||
}
|
||||
|
||||
|
@ -20,10 +20,10 @@ vsetdispmode 0
|
||||
vdisplay o1 o2
|
||||
vdisplay b1 b2
|
||||
vfit
|
||||
vdrawtext tb1 "b1" -pos 0 -3 3 -color 1.0 0.098 0.098 -halign right -valign bottom -angle 000 -zoom 0 -height 14 -aspect regular -font SansFont
|
||||
vdrawtext tb2 "b2" -pos 3 0 3 -color 0.098 1.0 0.098 -halign right -valign bottom -angle 000 -zoom 0 -height 14 -aspect regular -font SansFont
|
||||
vdrawtext bc_1 "bc_1" -pos 0 -9 3 -color 1.0 0.8823 0.8823 -halign right -valign bottom -angle 000 -zoom 0 -height 14 -aspect regular -font SansFont
|
||||
vdrawtext bc_2 "bc_2" -pos 3 -6 3 -color 1.0 0.8823 0.8823 -halign right -valign bottom -angle 000 -zoom 0 -height 14 -aspect regular -font SansFont
|
||||
vdrawtext tb1 "b1" -pos 0 -3 3 -color FF1919 -halign right -valign bottom -angle 000 -zoom 0 -height 14 -aspect regular -font SansFont
|
||||
vdrawtext tb2 "b2" -pos 3 0 3 -color 19FF19 -halign right -valign bottom -angle 000 -zoom 0 -height 14 -aspect regular -font SansFont
|
||||
vdrawtext bc_1 "bc_1" -pos 0 -9 3 -color FFE1E1 -halign right -valign bottom -angle 000 -zoom 0 -height 14 -aspect regular -font SansFont
|
||||
vdrawtext bc_2 "bc_2" -pos 3 -6 3 -color FFE1E1 -halign right -valign bottom -angle 000 -zoom 0 -height 14 -aspect regular -font SansFont
|
||||
vsetdispmode 1
|
||||
set anImage ${imagedir}/${casename}_2_1.png
|
||||
vdump ${anImage}
|
||||
|
@ -13,11 +13,11 @@ vfit
|
||||
vsetdispmode 1
|
||||
vaspects -setwidth 5
|
||||
vmoveto 200 200
|
||||
if { "[vreadpixel 264 288 rgb name]" != "CYAN1" } {
|
||||
if { "[vreadpixel 264 288 rgb name]" != "CYAN" } {
|
||||
puts "Error : Highlighting of dimension with flipping in local context failed."
|
||||
}
|
||||
|
||||
if { "[vreadpixel 251 271 rgb name]" != "CYAN1" } {
|
||||
if { "[vreadpixel 251 271 rgb name]" != "CYAN" } {
|
||||
puts "Error : Highlighting of dimension with flipping in local context failed."
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ vclipplane change pln1 capping on
|
||||
vfit
|
||||
vmoveto 304 146
|
||||
|
||||
if { "[vreadpixel 304 146 rgb name]" != "CYAN1" } {
|
||||
if { "[vreadpixel 304 146 rgb name]" != "CYAN" } {
|
||||
puts "Error : Highlighting is broken."
|
||||
}
|
||||
|
||||
|
@ -15,13 +15,13 @@ vdisplay -noupdate b
|
||||
vtop
|
||||
vfit
|
||||
|
||||
vdrawtext 000_3D "000 3D" -pos 0.0 0.0 0.0 -color 1.0 1.0 1.0 -halign center -valign center -angle 000 -zoom 0 -height 16 -aspect regular -font SansFont
|
||||
vdrawtext 001_3D "001 3D" -pos 0.0 1.0 0.0 -color 1.0 1.0 1.0 -halign center -valign center -angle 000 -zoom 0 -height 16 -aspect regular -font SansFont
|
||||
vdrawtext 101_3D "101 3D" -pos 0.0 2.0 0.0 -color 1.0 1.0 1.0 -halign center -valign center -angle 000 -zoom 0 -height 16 -aspect regular -font SansFont
|
||||
vdrawtext 110_3D "110 3D" -pos 0.0 3.0 0.0 -color 1.0 1.0 1.0 -halign center -valign center -angle 000 -zoom 0 -height 16 -aspect regular -font SansFont
|
||||
vdrawtext t1 "000 2D" -2d -perspos -1 1 -pos 100 -200 0 -height 16 -font SansFont -color 1 1 1 -disptype normal -subcolor 0 0 1
|
||||
vdrawtext t2 "001 2D" -2d -perspos -1 1 -pos 100 -250 0 -height 16 -font SansFont -color 1 1 1 -disptype normal -subcolor 0 0 1
|
||||
vdrawtext t3 "101 2D" -2d -perspos -1 1 -pos 100 -300 0 -height 16 -font SansFont -color 1 1 1 -disptype normal -subcolor 0 0 1
|
||||
vdrawtext t4 "110 2D" -2d -perspos -1 1 -pos 100 -350 0 -height 16 -font SansFont -color 1 1 1 -disptype normal -subcolor 0 0 1
|
||||
vdrawtext 000_3D "000 3D" -pos 0.0 0.0 0.0 -color WHITE -halign center -valign center -angle 000 -zoom 0 -height 16 -aspect regular -font SansFont
|
||||
vdrawtext 001_3D "001 3D" -pos 0.0 1.0 0.0 -color WHITE -halign center -valign center -angle 000 -zoom 0 -height 16 -aspect regular -font SansFont
|
||||
vdrawtext 101_3D "101 3D" -pos 0.0 2.0 0.0 -color WHITE -halign center -valign center -angle 000 -zoom 0 -height 16 -aspect regular -font SansFont
|
||||
vdrawtext 110_3D "110 3D" -pos 0.0 3.0 0.0 -color WHITE -halign center -valign center -angle 000 -zoom 0 -height 16 -aspect regular -font SansFont
|
||||
vdrawtext t1 "000 2D" -2d -perspos -1 1 -pos 100 -200 0 -height 16 -font SansFont -color WHITE -disptype normal -subcolor BLUE
|
||||
vdrawtext t2 "001 2D" -2d -perspos -1 1 -pos 100 -250 0 -height 16 -font SansFont -color WHITE -disptype normal -subcolor BLUE
|
||||
vdrawtext t3 "101 2D" -2d -perspos -1 1 -pos 100 -300 0 -height 16 -font SansFont -color WHITE -disptype normal -subcolor BLUE
|
||||
vdrawtext t4 "110 2D" -2d -perspos -1 1 -pos 100 -350 0 -height 16 -font SansFont -color WHITE -disptype normal -subcolor BLUE
|
||||
|
||||
checkview -screenshot -3d -path ${imagedir}/${test_image}.png
|
||||
|
@ -10,15 +10,15 @@ vaxo
|
||||
|
||||
# create default color scale
|
||||
vcolorscale cs1 -demo -xy 0 0
|
||||
foreach {y aColor} {20 RED 60 DARKORANGE1 100 GOLD 140 GREENYELLOW 180 CHARTREUSE2 220 GREEN 250 MEDIUMSPRINGGREEN 290 CYAN1 330 DODGERBLUE1 370 BLUE1} { if { [vreadpixel 15 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
|
||||
foreach {y aColor} {20 RED 60 DARKORANGE1 100 GOLD 140 GREENYELLOW 180 CHARTREUSE2 220 GREEN 250 MEDIUMSPRINGGREEN 290 CYAN 330 DODGERBLUE1 370 BLUE} { if { [vreadpixel 15 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
|
||||
|
||||
# reduce color scale range and number of intervals
|
||||
vcolorscale cs2 -range 0 20 5 -xy 60 0
|
||||
foreach {y aColor} {40 RED 120 YELLOW 200 GREEN 280 CYAN2 350 BLUE1} { if { [vreadpixel 75 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
|
||||
foreach {y aColor} {40 RED 120 YELLOW 200 GREEN 280 CYAN2 350 BLUE} { if { [vreadpixel 75 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
|
||||
|
||||
# set user-defined colors and labels for color scale
|
||||
vcolorscale cs3 -range 0 20 5 -colors white 0 0 1 green 1 0 0 1 1 1 -labels start 1 2 3 4 end -xy 120 0
|
||||
foreach {y aColor} {40 WHITE 120 RED 200 GREEN 280 BLUE1 350 WHITE} { if { [vreadpixel 135 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
|
||||
foreach {y aColor} {40 WHITE 120 RED 200 GREEN 280 BLUE 350 WHITE} { if { [vreadpixel 135 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
|
||||
|
||||
# change colors of first and last intervals
|
||||
vcolorscale cs4 -range 0 20 5 -colors white 0 0 1 green 1 0 0 1 1 1 -labels start 1 2 3 4 end -xy 200 0
|
||||
@ -26,5 +26,5 @@ vcolorscale cs4 -color 1 0.42 0.35 0.8
|
||||
vcolorscale cs4 -color 5 pink
|
||||
vcolorscale cs4 -label 6 "last"
|
||||
vcolorscale cs4 -title "My color scale"
|
||||
foreach {y aColor} {60 PINK 120 RED 200 GREEN 280 BLUE1 350 SLATEBLUE} { if { [vreadpixel 215 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
|
||||
foreach {y aColor} {60 PINK 120 RED 200 GREEN 280 BLUE 350 SLATEBLUE} { if { [vreadpixel 215 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
|
||||
vdump ${imagedir}/${casename}.png
|
||||
|
@ -16,7 +16,7 @@ vdisplay b
|
||||
vfit
|
||||
set s [encoding convertfrom unicode "\x3A\x04\x30\x04\x40\x04\x2E\x00\x70\x00\x6E\x00\x67\x00"]
|
||||
|
||||
vdrawtext text0 $s -pos 0 0 0 -color 1.0 1.0 1.0 -halign left -valign bottom -angle 0 -zoom 0 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext text0 $s -pos 0 0 0 -color WHITE -halign left -valign bottom -angle 0 -zoom 0 -height 50 -aspect regular -font SansFont
|
||||
vdump $::imagedir/$s
|
||||
vtexture b $::imagedir/$s
|
||||
file delete $::imagedir/$s
|
||||
|
@ -16,7 +16,7 @@ vbackground -image $aTextureFile -imageMode NONE
|
||||
vbackground -image $aTextureFile -imageMode TILED
|
||||
vdump $imagedir/${casename}_2.png
|
||||
|
||||
vbackground -gradient RED BLUE1 -gradientMode HORIZONTAL
|
||||
vbackground -gradient RED BLUE -gradientMode HORIZONTAL
|
||||
vbackground -image $aTextureFile -imageMode CENTERED
|
||||
vdump $imagedir/${casename}_3.png
|
||||
|
||||
|
@ -18,7 +18,7 @@ vdisplay b
|
||||
vfit
|
||||
vsetdispmode b 1
|
||||
|
||||
vdrawtext text "Open\nCASCADE" -pos 0 0 0 -color 1.0 0.0 0.0 -halign center -valign center -angle -45 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
vdrawtext text "Open\nCASCADE" -pos 0 0 0 -color RED -halign center -valign center -angle -45 -zoom 1 -height 50 -aspect regular -font SansFont
|
||||
|
||||
set x_coord 255
|
||||
set y_coord 277
|
||||
|
@ -17,7 +17,7 @@ vsetdispmode 1
|
||||
vdisplay b_1 b_2
|
||||
vfit
|
||||
|
||||
vdrawtext text "SAMPLE TEXT" -pos 1 0 3 -color 1.0 0.0 0.0 -halign left -valign bottom -angle 0 -zoom 0 -height 30 -aspect regular -font SansFont
|
||||
vdrawtext text "SAMPLE TEXT" -pos 1 0 3 -color RED -halign left -valign bottom -angle 0 -zoom 0 -height 30 -aspect regular -font SansFont
|
||||
|
||||
set bug_info [vreadpixel 260 137 rgb name]
|
||||
if {$bug_info != "RED"} {
|
||||
|
@ -1,25 +1,16 @@
|
||||
puts "========"
|
||||
puts "OCC25775"
|
||||
puts "0025775: Default Gradient Backgound in V3d_Viewer has no effect in new created V3d_View"
|
||||
puts "========"
|
||||
puts ""
|
||||
################################################################
|
||||
# "Default Gradient Backgound" in V3d_Viewer has no effect in new created V3d_View.
|
||||
################################################################
|
||||
|
||||
pload ALL
|
||||
pload VISUALIZATION
|
||||
vbackground -default -gradient BLACK GRAY25 -gradientMode HORIZONTAL
|
||||
vinit View1 w=400 h=400
|
||||
if { [checkcolor 399 100 0.25 0.25 0.25] != 1 } {
|
||||
puts "Error: bug with default gradient color is reproduced."
|
||||
}
|
||||
if { [vreadpixel 399 100 -rgb -name] != "GRAY25" } { puts "Error: bug with default gradient color is reproduced." }
|
||||
|
||||
vinit View2 w=400 h=400
|
||||
if { [checkcolor 399 100 0.25 0.25 0.25] != 1 } {
|
||||
puts "Error: bug with default gradient color is reproduced."
|
||||
}
|
||||
if { [vreadpixel 399 100 -rgb -name] != "GRAY25" } { puts "Error: bug with default gradient color is reproduced." }
|
||||
|
||||
vbackground -default -color 0.501961 0.501961 0.501961
|
||||
vbackground -default -color GRAY50
|
||||
vinit View3
|
||||
if { [checkcolor 100 100 0.5 0.5 0.5] != 1 } {
|
||||
puts "Error: bug with default background color is reproduced."
|
||||
}
|
||||
if { [vreadpixel 100 100 -rgb -name] != "GRAY50" } { puts "Error: bug with default background color is reproduced." }
|
||||
|
@ -19,8 +19,8 @@ set bug_info_1 [vreadpixel 50 50 rgb name]
|
||||
if {$bug_info_1 != "GRAY4"} {
|
||||
puts "ERROR: OCC26404 is reproduced. Background color is invalid (case #1)."
|
||||
}
|
||||
vbackground -gradient RED BLUE1 -gradientMode HORIZONTAL
|
||||
vbackground -gradient RED BLUE1 -gradientMode NONE
|
||||
vbackground -gradient RED BLUE -gradientMode HORIZONTAL
|
||||
vbackground -gradient RED BLUE -gradientMode NONE
|
||||
set bug_info_2 [vreadpixel 50 50 rgb name]
|
||||
if {$bug_info_2 != "GRAY4"} {
|
||||
puts "ERROR: OCC26404 is reproduced. Background color is invalid (case #2)."
|
||||
|
@ -13,7 +13,7 @@ vinit View1
|
||||
vclear
|
||||
vaxo
|
||||
|
||||
vbackground -gradient RED BLUE1 -gradientMode VERTICAL
|
||||
vbackground -gradient RED BLUE -gradientMode VERTICAL
|
||||
box b 1 2 3
|
||||
vdisplay b
|
||||
|
||||
|
@ -16,7 +16,7 @@ meshcolors m elem2 1
|
||||
vselmode 0 1
|
||||
|
||||
vmoveto 200 200
|
||||
if {[vreadpixel 197 257 rgb name] != "CYAN1"} {
|
||||
if {[vreadpixel 197 257 rgb name] != "CYAN"} {
|
||||
puts "ERROR: presentation for dynamic highlight of the object is wrong!"
|
||||
}
|
||||
vmoveto 0 0
|
||||
|
@ -25,7 +25,7 @@ vviewparams -eye 0.7 -1.14 -0.17
|
||||
# with dynamic highlight color, check that the face is
|
||||
# not highlighted
|
||||
vmoveto 280 290
|
||||
if {[vreadpixel 297 297 name] != "CYAN1 1"} {
|
||||
if {[vreadpixel 297 297 name] != "CYAN 1"} {
|
||||
puts "ERROR: zoom persistent box is not highlighted dynamically!"
|
||||
}
|
||||
if {[vreadpixel 372 210 name] != "GOLDENROD1 1"} {
|
||||
@ -46,7 +46,7 @@ vviewparams -eye 0.96 1.053 0.31
|
||||
# will be highlighted dynamically
|
||||
vmoveto 264 135
|
||||
|
||||
if {[vreadpixel 275 142 name] != "CYAN1 1"} {
|
||||
if {[vreadpixel 275 142 name] != "CYAN 1"} {
|
||||
puts "ERROR: zoom persistent box is not highlighted dynamically in precision test!"
|
||||
}
|
||||
if {[vreadpixel 243 123 name] != "LIGHTGOLDENROD1 1"} {
|
||||
@ -61,7 +61,7 @@ vmoveto 259 135
|
||||
if {[vreadpixel 275 142 name] != "GOLDENROD3 1"} {
|
||||
puts "ERROR: zoom persistent box is highlighted instead in precision test!"
|
||||
}
|
||||
if {[vreadpixel 243 123 name] != "CYAN1 1"} {
|
||||
if {[vreadpixel 243 123 name] != "CYAN 1"} {
|
||||
puts "ERROR: the shape behind zoom persistent object was not highlighted dynamically in precision test!"
|
||||
}
|
||||
vdump ${imagedir}/${casename}_3.png
|
||||
|
@ -26,7 +26,7 @@ vselmode 4 1
|
||||
|
||||
# pick a point onto previously computed face
|
||||
vmoveto 80 265
|
||||
if {[vreadpixel 90 206 name] == "CYAN1 1"} {
|
||||
if {[vreadpixel 90 206 name] == "CYAN 1"} {
|
||||
puts "ERROR: previously computed entities are highlighted! Selection mode 4 was not updated after redisplaying the box."
|
||||
}
|
||||
# pick a point onto box
|
||||
|
@ -20,7 +20,7 @@ vselmode aFace1 2 1
|
||||
vfit
|
||||
|
||||
vmoveto 142 127
|
||||
if {[vreadpixel 142 127 name] == "CYAN1 1"} {
|
||||
if {[vreadpixel 142 127 name] == "CYAN 1"} {
|
||||
puts "OK"
|
||||
} elseif {[vreadpixel 142 127 name] == "GREEN 1"} {
|
||||
puts "ERROR: the upper edge cannot be highlighted!"
|
||||
|
@ -13,7 +13,7 @@ proc check_highlighting { theHiBoxIdx theCoords } {
|
||||
set nextColor [vreadpixel [lindex $theCoords [expr $aNext * 2] ] [lindex $theCoords [expr $aNext * 2 + 1] ] name]
|
||||
set nextNextColor [vreadpixel [lindex $theCoords [expr $aNextNext * 2] ] [lindex $theCoords [expr $aNextNext * 2 + 1] ] name]
|
||||
|
||||
if {$hiColor == "CYAN1 1" && $nextColor == "YELLOW 1" && $nextNextColor == "YELLOW 1"} {
|
||||
if {$hiColor == "CYAN 1" && $nextColor == "YELLOW 1" && $nextNextColor == "YELLOW 1"} {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
|
@ -12,7 +12,7 @@ vcolorscale cs -demo
|
||||
vcolorscale cs -range 0 20 5
|
||||
|
||||
# Set user-defined colors and labels for color scale
|
||||
vcolorscale cs -colors white red green blue1 gray
|
||||
vcolorscale cs -colors white red green BLUE gray
|
||||
vdump ${imagedir}/${casename}_pos.png
|
||||
|
||||
if {[vcolorscale cs -findcolor 0] != "WHITE"} { puts "ERROR: wrong 1st segment сolor" }
|
||||
|
@ -9,6 +9,6 @@ puts "Draw Harness, ViewerTest - vdrawtext command ignores text display options"
|
||||
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
|
||||
vinit
|
||||
vdrawtext t1 "Subtitle" -height 20 -font SansFont -color 0 1 0 -disptype subtitle -subcolor 0.3 0.3 0.3
|
||||
vdrawtext t1 "Subtitle" -height 20 -font SansFont -color GREEN -disptype subtitle -subcolor 4C4C4C
|
||||
vfit
|
||||
vdump $imagedir/${casename}.png
|
||||
|
@ -47,15 +47,15 @@ set test_2 {350 150}; # box2d_pos
|
||||
set test_3 { 50 350}; # box2d_loc
|
||||
|
||||
vmoveto {*}$test_1
|
||||
if {[vreadpixel {*}$test_1 name] != "CYAN1 1"} { puts "ERROR: zoom persistent box is not detected!" }
|
||||
if {[vreadpixel {*}$test_1 name] != "CYAN 1"} { puts "ERROR: zoom persistent box is not detected!" }
|
||||
vdump $imagedir/${casename}_1.png
|
||||
|
||||
vmoveto {*}$test_2
|
||||
if {[vreadpixel {*}$test_2 name] != "CYAN1 1"} { puts "ERROR: zoom persistent box is not detected!" }
|
||||
if {[vreadpixel {*}$test_2 name] != "CYAN 1"} { puts "ERROR: zoom persistent box is not detected!" }
|
||||
vdump $imagedir/${casename}_2.png
|
||||
|
||||
vmoveto {*}$test_3
|
||||
if {[vreadpixel {*}$test_3 name] != "CYAN1 1"} { puts "ERROR: zoom persistent box is not detected!" }
|
||||
if {[vreadpixel {*}$test_3 name] != "CYAN 1"} { puts "ERROR: zoom persistent box is not detected!" }
|
||||
vdump $imagedir/${casename}_3.png
|
||||
|
||||
# =========================================
|
||||
@ -69,13 +69,13 @@ set test_2 {350 150}; # box2d_pos
|
||||
set test_3 { 50 350}; # box2d_loc
|
||||
|
||||
vmoveto {*}$test_1
|
||||
if {[vreadpixel {*}$test_1 name] != "CYAN1 1"} { puts "ERROR: zoom persistent box is not detected!" }
|
||||
if {[vreadpixel {*}$test_1 name] != "CYAN 1"} { puts "ERROR: zoom persistent box is not detected!" }
|
||||
vdump $imagedir/${casename}_4.png
|
||||
|
||||
vmoveto {*}$test_2
|
||||
if {[vreadpixel {*}$test_2 name] != "CYAN1 1"} { puts "ERROR: zoom persistent box is not detected!" }
|
||||
if {[vreadpixel {*}$test_2 name] != "CYAN 1"} { puts "ERROR: zoom persistent box is not detected!" }
|
||||
vdump $imagedir/${casename}_5.png
|
||||
|
||||
vmoveto {*}$test_3
|
||||
if {[vreadpixel {*}$test_3 name] != "CYAN1 1"} { puts "ERROR: zoom persistent box is not detected!" }
|
||||
if {[vreadpixel {*}$test_3 name] != "CYAN 1"} { puts "ERROR: zoom persistent box is not detected!" }
|
||||
vdump $imagedir/${casename}_6.png
|
||||
|
@ -17,7 +17,7 @@ box b4 0 10 0 10 30 70
|
||||
box b5 0 0 0 30 10 70
|
||||
|
||||
set aNbParts 6
|
||||
set aColors { RED YELLOW GREEN GRAY MAGENTA1 ORANGE }
|
||||
set aColors { RED YELLOW GREEN GRAY MAGENTA ORANGE }
|
||||
|
||||
compound b0 b1 b2 b3 b4 b5 cc
|
||||
|
||||
|
@ -76,8 +76,8 @@ vdisplay -dispMode 1 -highMode 1 -2d -trsfPersPos 0 0 {*}$aList
|
||||
vsetmaterial b1 b2 b3 b4 t PLASTIC
|
||||
vsetcolor b1 RED
|
||||
vsetcolor b2 GREEN
|
||||
vsetcolor b3 BLUE1
|
||||
vsetcolor b4 MAGENTA1
|
||||
vsetcolor b3 BLUE
|
||||
vsetcolor b4 MAGENTA
|
||||
vsetcolor t GOLD
|
||||
vsetlocation s 0 0 -1
|
||||
|
||||
|
@ -11,7 +11,7 @@ box b 0 0 -100 100 90 10
|
||||
vclear
|
||||
vinit View1
|
||||
vaxo
|
||||
vbackground -gradient 0.705882 0.784314 1 0.705882 0.705882 0.705882 -gradientMode VERTICAL
|
||||
vbackground -gradient B4C8FF B4B4B4 -gradientMode VERTICAL
|
||||
vzbufftrihedron
|
||||
vdisplay -dispMode 1 b
|
||||
vsetlocation b 0 0 1000
|
||||
|
@ -25,7 +25,7 @@ vtrihedron t1 -attribute TubeRadiusPercent 0.03
|
||||
vtrihedron t1 -attribute ConeRadiusPercent|OriginRadiusPercent 0.05
|
||||
vtrihedron t1 -color XAxis Quantity_NOC_RED
|
||||
vtrihedron t1 -color YAxis Quantity_NOC_GREEN
|
||||
vtrihedron t1 -color ZAxis|Origin Quantity_NOC_BLUE1
|
||||
vtrihedron t1 -color ZAxis|Origin Quantity_NOC_BLUE
|
||||
|
||||
vtrihedron t1 -textColor 1.0 1.0 1.0
|
||||
vtrihedron t1 -arrowColor 0.0 0.0 1.0
|
||||
|
@ -11,19 +11,19 @@ vaxo
|
||||
# create default color scale
|
||||
vcolorscale cs1 -demo -smooth 0 -xy 0 0
|
||||
vcolorscale cs2 -demo -smooth 1 -xy 60 0
|
||||
foreach {y aColor} {20 RED 60 DARKORANGE1 100 GOLD 140 GREENYELLOW 180 CHARTREUSE2 220 GREEN 250 MEDIUMSPRINGGREEN 290 CYAN1 330 DODGERBLUE1 370 BLUE1} { if { [vreadpixel 15 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
|
||||
foreach {y aColor} {20 RED 60 DARKORANGE1 100 GOLD 140 GREENYELLOW 180 CHARTREUSE2 220 GREEN 250 MEDIUMSPRINGGREEN 290 CYAN1 330 DODGERBLUE1 370 BLUE1} { if { [vreadpixel 15 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
|
||||
foreach {y aColor} {20 RED 60 DARKORANGE1 100 GOLD 140 GREENYELLOW 180 CHARTREUSE2 220 GREEN 250 MEDIUMSPRINGGREEN 290 CYAN 330 DODGERBLUE1 370 BLUE} { if { [vreadpixel 15 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
|
||||
foreach {y aColor} {20 RED 60 DARKORANGE1 100 GOLD 140 GREENYELLOW 180 CHARTREUSE2 220 GREEN 250 MEDIUMSPRINGGREEN 290 CYAN 330 DODGERBLUE1 370 BLUE} { if { [vreadpixel 15 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
|
||||
|
||||
# reduce color scale range and number of intervals
|
||||
vcolorscale cs3 -range 0 20 5 -font 16 -colors white 0 0 1 green 1 0 0 1 1 1 -labels start 1 2 3 4 end -smooth 0 -xy 120 0
|
||||
vcolorscale cs4 -range 0 20 5 -font 16 -colors white 0 0 1 green 1 0 0 1 1 1 -labels start 1 2 3 4 end -smooth 1 -xy 180 0
|
||||
foreach {y aColor} {40 WHITE 120 RED 200 GREEN 280 BLUE1 350 WHITE} { if { [vreadpixel 135 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
|
||||
foreach {y aColor} {40 WHITE 120 RED 200 GREEN 280 BLUE 350 WHITE} { if { [vreadpixel 135 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
|
||||
|
||||
# color scale with overridden hue range
|
||||
vcolorscale cs5 -demo -smooth 0 -hueRange 300 130 -xy 240 0
|
||||
vcolorscale cs6 -demo -smooth 1 -hueRange 300 130 -xy 300 0
|
||||
foreach {y aColor} {20 GREEN 60 SPRINGGREEN 100 CYAN2 140 TURQUOISE2 180 DODGERBLUE1 220 BLUE1 250 BLUE1 290 BLUEVIOLET 330 PURPLE 370 MAGENTA1} { if { [vreadpixel 245 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
|
||||
foreach {y aColor} {20 GREEN 60 SPRINGGREEN 100 CYAN2 140 TURQUOISE2 180 DODGERBLUE1 220 DODGERBLUE2 250 BLUE1 290 BLUE1 330 PURPLE 370 MAGENTA2} { if { [vreadpixel 315 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
|
||||
foreach {y aColor} {20 GREEN 60 SPRINGGREEN 100 CYAN2 140 TURQUOISE2 180 DODGERBLUE1 220 BLUE 250 BLUE 290 BLUEVIOLET 330 PURPLE 370 MAGENTA} { if { [vreadpixel 245 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
|
||||
foreach {y aColor} {20 GREEN 60 SPRINGGREEN 100 CYAN2 140 TURQUOISE2 180 DODGERBLUE1 220 DODGERBLUE2 250 BLUE 290 BLUE 330 PURPLE 370 MAGENTA2} { if { [vreadpixel 315 $y rgb name] != "$aColor" } { puts "Error: wrong color at $y" } }
|
||||
|
||||
# free labels
|
||||
vcolorscale cs7 -demo -smooth 0 -colorRange BLACK WHITE -xy 360 0 -freeLabels 3 l1 l2 l3
|
||||
|
@ -17,7 +17,7 @@ vaxo
|
||||
vdisplay -dispMode 1 c
|
||||
vfit
|
||||
|
||||
vaspects c -setColor BLUE1
|
||||
vaspects c -setColor BLUE
|
||||
vaspects c -subshapes b1 -setColor RED
|
||||
vaspects c -subshapes c12 -setColor GREEN
|
||||
|
||||
|
@ -24,17 +24,17 @@ vaxo
|
||||
vdisplay b1_1 b1_2 b1_3
|
||||
vsetcolor b1_1 RED
|
||||
vsetcolor b1_2 GREEN
|
||||
vsetcolor b1_3 BLUE1
|
||||
vsetcolor b1_3 BLUE
|
||||
|
||||
vdisplay b2_1 b2_2 b2_3
|
||||
vsetcolor b2_1 RED
|
||||
vsetcolor b2_2 GREEN
|
||||
vsetcolor b2_3 BLUE1
|
||||
vsetcolor b2_3 BLUE
|
||||
|
||||
vdisplay b3_1 b3_2 b3_3
|
||||
vsetcolor b3_1 RED
|
||||
vsetcolor b3_2 GREEN
|
||||
vsetcolor b3_3 BLUE1
|
||||
vsetcolor b3_3 BLUE
|
||||
vfit
|
||||
vdump $imagedir/${casename}_ref.png
|
||||
|
||||
@ -54,8 +54,8 @@ vaspects b123_123 -subshapes b2_123 -setColor RED
|
||||
vaspects b123_123 -subshapes b3_123 -setColor RED
|
||||
|
||||
compound b2_3 b3_3 b23_3
|
||||
vaspects b123_123 -subshapes b1_3 -setColor BLUE1
|
||||
vaspects b123_123 -subshapes b23_3 -setColor BLUE1
|
||||
vaspects b123_123 -subshapes b1_3 -setColor BLUE
|
||||
vaspects b123_123 -subshapes b23_3 -setColor BLUE
|
||||
|
||||
if { [vreadpixel 50 250 rgb name] != "RED3" } { puts "Error: wrong color" }
|
||||
if { [vreadpixel 175 175 rgb name] != "RED3" } { puts "Error: wrong color" }
|
||||
|
@ -14,6 +14,6 @@ vfit
|
||||
vhlr on
|
||||
|
||||
vmoveto 250 250
|
||||
if { [vreadpixel 321 150 rgb name] != "CYAN1" } { puts "Error: the box is not highlighted" }
|
||||
if { [vreadpixel 321 150 rgb name] != "CYAN" } { puts "Error: the box is not highlighted" }
|
||||
|
||||
vdump $imagedir/${casename}.png
|
||||
|
@ -12,15 +12,15 @@ vinit View1
|
||||
vaxo
|
||||
vfont add [locate_data_file DejaVuSans.ttf] SansFont
|
||||
|
||||
vdrawtext t1 "Overlay Test Blend" -2d -perspos -1 1 -pos 100 -50 0 -height 16 -font SansFont -color 1 1 0 -disptype blend -subcolor 0 0 1
|
||||
vdrawtext t2 "Overlay Test Decal" -2d -perspos -1 1 -pos 100 -100 0 -height 16 -font SansFont -color 1 1 0 -disptype decal -subcolor 0 0 1
|
||||
vdrawtext t3 "Overlay Test Subtitle" -2d -perspos -1 1 -pos 100 -150 0 -height 16 -font SansFont -color 1 1 0 -disptype subtitle -subcolor 0 0 1
|
||||
vdrawtext t4 "Overlay Test Normal" -2d -perspos -1 1 -pos 100 -200 0 -height 16 -font SansFont -color 0 1 1 -disptype normal -subcolor 0 0 1
|
||||
vdrawtext t1 "Overlay Test Blend" -2d -perspos -1 1 -pos 100 -50 0 -height 16 -font SansFont -color YELLOW -disptype blend -subcolor BLUE
|
||||
vdrawtext t2 "Overlay Test Decal" -2d -perspos -1 1 -pos 100 -100 0 -height 16 -font SansFont -color YELLOW -disptype decal -subcolor BLUE
|
||||
vdrawtext t3 "Overlay Test Subtitle" -2d -perspos -1 1 -pos 100 -150 0 -height 16 -font SansFont -color YELLOW -disptype subtitle -subcolor BLUE
|
||||
vdrawtext t4 "Overlay Test Normal" -2d -perspos -1 1 -pos 100 -200 0 -height 16 -font SansFont -color CYAN -disptype normal -subcolor BLUE
|
||||
|
||||
vdrawtext t5 " Overlay Test Normal \n Second line" -2d -perspos -1 1 -pos 100 -250 0 -height 16 -font SansFont -color 0 1 1 -disptype normal -subcolor 0 0 1
|
||||
vdrawtext t6 " Overlay Test Subtitle\n Second line" -2d -perspos -1 1 -pos 100 -300 0 -height 16 -font SansFont -color 1 1 0 -disptype subtitle -subcolor 0 0 1
|
||||
vdrawtext t7 " Overlay Test Decal \n Second line" -2d -perspos -1 1 -pos 100 -350 0 -height 16 -font SansFont -color 1 1 0 -disptype decal -subcolor 0 0 1
|
||||
vdrawtext t8 " Overlay Test Blend \n Second line" -2d -perspos -1 1 -pos 100 -400 0 -height 16 -font SansFont -color 1 1 0 -disptype blend -subcolor 0 0 1
|
||||
vdrawtext t5 " Overlay Test Normal \n Second line" -2d -perspos -1 1 -pos 100 -250 0 -height 16 -font SansFont -color CYAN -disptype normal -subcolor BLUE
|
||||
vdrawtext t6 " Overlay Test Subtitle\n Second line" -2d -perspos -1 1 -pos 100 -300 0 -height 16 -font SansFont -color YELLOW -disptype subtitle -subcolor BLUE
|
||||
vdrawtext t7 " Overlay Test Decal \n Second line" -2d -perspos -1 1 -pos 100 -350 0 -height 16 -font SansFont -color YELLOW -disptype decal -subcolor BLUE
|
||||
vdrawtext t8 " Overlay Test Blend \n Second line" -2d -perspos -1 1 -pos 100 -400 0 -height 16 -font SansFont -color YELLOW -disptype blend -subcolor BLUE
|
||||
|
||||
box b 50 50 50
|
||||
vdisplay -dispMode 1 b
|
||||
|
@ -15,7 +15,7 @@ vaxo
|
||||
vdisplay -noupdate -dispMode 1 -top r g b
|
||||
vsetcolor -noupdate r RED
|
||||
vsetcolor -noupdate g GREEN
|
||||
vsetcolor -noupdate b BLUE1
|
||||
vsetcolor -noupdate b BLUE
|
||||
vfit
|
||||
|
||||
vdisplay -topmost g
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user