equal
deleted
inserted
replaced
1 "{ Package: 'stx:libwidg2' }" |
1 "{ Package: 'stx:libwidg2' }" |
|
2 |
|
3 "{ NameSpace: Smalltalk }" |
2 |
4 |
3 GraphColumnView subclass:#GraphColumnView3D |
5 GraphColumnView subclass:#GraphColumnView3D |
4 instanceVariableNames:'glxView showGraph rotateX rotateY rotateZ rotateXHolder |
6 instanceVariableNames:'glxView showGraph rotateX rotateY rotateZ rotateXHolder |
5 rotateYHolder rotateZHolder zoomZ zoomZHolder showAxis' |
7 rotateYHolder rotateZHolder zoomZ zoomZHolder showAxis' |
6 classVariableNames:'' |
8 classVariableNames:'' |
867 |
869 |
868 useCol := aColor ? graph foregroundColor. |
870 useCol := aColor ? graph foregroundColor. |
869 index := colorMap at:useCol ifAbsent:nil. |
871 index := colorMap at:useCol ifAbsent:nil. |
870 |
872 |
871 index isNil ifTrue:[ |
873 index isNil ifTrue:[ |
872 index := colorMap size + self class numberOfStandardColors. |
874 index := colorMap size + self class numberOfStandardColors. |
873 |
875 |
874 ( (index > self class maxColors) |
876 ( (index > self class maxColors) |
875 or:[(useCol := useCol on:device) colorId isNil] |
877 or:[(useCol := useCol onDevice:device) colorId isNil] |
876 ) ifTrue:[ |
878 ) ifTrue:[ |
877 Transcript showCR:'cannot allocate more colors'. |
879 Transcript showCR:'cannot allocate more colors'. |
878 index := (useCol brightness > 0.5) ifTrue:[White] |
880 index := (useCol brightness > 0.5) ifTrue:[White] |
879 ifFalse:[Black] |
881 ifFalse:[Black] |
880 ] ifFalse:[ |
882 ] ifFalse:[ |
881 colorMap at:useCol put:index. |
883 colorMap at:useCol put:index. |
882 |
884 |
883 self colorRed:(useCol red) |
885 self colorRed:(useCol red) |
884 green:(useCol green) |
886 green:(useCol green) |
885 blue:(useCol blue). |
887 blue:(useCol blue). |
886 |
888 |
887 self mapColor:index |
889 self mapColor:index |
888 red:(useCol redByte) |
890 red:(useCol redByte) |
889 green:(useCol greenByte) |
891 green:(useCol greenByte) |
890 blue:(useCol blueByte) |
892 blue:(useCol blueByte) |
891 ] |
893 ] |
892 ]. |
894 ]. |
893 self color:index. |
895 self color:index. |
894 |
|
895 |
|
896 ! ! |
896 ! ! |
897 |
897 |
898 !GraphColumnView3D::GLXGraph methodsFor:'redraw'! |
898 !GraphColumnView3D::GLXGraph methodsFor:'redraw'! |
899 |
899 |
900 invalidate |
900 invalidate |
959 ! ! |
959 ! ! |
960 |
960 |
961 !GraphColumnView3D class methodsFor:'documentation'! |
961 !GraphColumnView3D class methodsFor:'documentation'! |
962 |
962 |
963 version |
963 version |
964 ^ '$Header: /cvs/stx/stx/libwidg2/GraphColumnView3D.st,v 1.9 2006-11-13 16:11:30 cg Exp $' |
964 ^ '$Header$' |
965 ! ! |
965 ! ! |
|
966 |