Skip to content

Commit

Permalink
Testing GUI with dark background
Browse files Browse the repository at this point in the history
  • Loading branch information
mpfogaca authored and gaflach committed Dec 26, 2017
1 parent 477716a commit ec008ce
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion rsyn/src/rsyn/gui/CanvasGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ void CanvasGL::adjustAspectRatio() {
void CanvasGL::prepare2DViewport(const int width, const int height, const bool clear) {
wxGLCanvas::SetCurrent(*clsContext);

glClearColor(1.0f, 1.0f, 1.0f, 1.0f); // white background
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
glDisable(GL_TEXTURE_2D); // textures
glDisable(GL_COLOR_MATERIAL);
glDisable(GL_BLEND);
Expand Down
4 changes: 2 additions & 2 deletions rsyn/src/rsyn/gui/canvas/GeometryManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ GeometryManager::renderFocusedObject(
//glLogicOp(GL_INVERT);
//glEnable(GL_COLOR_LOGIC_OP);
glLineWidth(2);
glColor3ub(0, 0, 0);
glColor3ub(255, 255, 255);
glLineStipple(3, 0xAAAA);
glEnable(GL_LINE_STIPPLE);
glDisable(GL_DEPTH_TEST);
Expand All @@ -497,7 +497,7 @@ void
GeometryManager::renderHighlightedObjects() const {
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
glLineWidth(2);
glColor3ub(0, 0, 0);
glColor3ub(255, 255, 255);
glDisable(GL_DEPTH_TEST);

for (const ObjectId &objectId : highlightedObjects) {
Expand Down
14 changes: 7 additions & 7 deletions rsyn/src/rsyn/gui/canvas/PhysicalCanvasGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ void PhysicalCanvasGL::renderCoreBounds() {
// glEnable(GL_LINE_STIPPLE);

glBegin(GL_QUADS);
glColor3ub(0, 0, 0);
glColor3ub(255, 255, 255);
glVertex3d(bounds[LOWER][X], bounds[LOWER][Y], LAYER_BACKGROUND);
glVertex3d(bounds[UPPER][X], bounds[LOWER][Y], LAYER_BACKGROUND);
glVertex3d(bounds[UPPER][X], bounds[UPPER][Y], LAYER_BACKGROUND);
Expand Down Expand Up @@ -901,7 +901,7 @@ void PhysicalCanvasGL::renderSelectedCell() {
Rsyn::Design design = clsSession.getDesign();

glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
glColor3ub(0, 0, 0);
glColor3ub(255, 255, 255);

for (Rsyn::Pin sink : clsSelectedCell.allPins(Rsyn::IN)) {
drawPin(sink);
Expand Down Expand Up @@ -936,7 +936,7 @@ void PhysicalCanvasGL::renderSelectedCell() {
if (clsViewSelectedNodeNeighbours && clsSelectedCell) {
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
glLineWidth(3);
glColor3ub(0, 0, 0);
glColor3ub(255, 255, 255);

glBegin(GL_QUADS);

Expand Down Expand Up @@ -1013,7 +1013,7 @@ void PhysicalCanvasGL::renderTree() {

glLineWidth(2.0);
glBegin(GL_LINES);
glColor3ub(0, 0, 0);
glColor3ub(255, 255, 255);
for (Rsyn::Pin pin : clsSelectedCell.allPins()) {
if (!pin.isConnected())
continue;
Expand All @@ -1033,7 +1033,7 @@ void PhysicalCanvasGL::renderTree() {
glColor3ub(color.r, color.g, color.b);
colorIndex++;
} else {
glColor3ub(0, 0, 0);
glColor3ub(255, 255, 255);
} // end else

const Rsyn::RCTree & tree = routingEstimator->getRCTree(net);
Expand Down Expand Up @@ -1276,8 +1276,8 @@ void PhysicalCanvasGL::prepareGeometryManager() {

// Instances
geoCellLayerId = geoMgr.createLayer("cells", 0, Color(0, 210, 210), Color(0, 210, 210), LINE_STIPPLE_SOLID, STIPPLE_MASK_EMPTY);
geoMacroLayerId = geoMgr.createLayer("macros", 0, Color(0, 0, 0), Color(0, 0, 0), LINE_STIPPLE_NONE, STIPPLE_MASK_FILL);
geoPortLayerId = geoMgr.createLayer("ports", 0, Color(0, 0, 0), Color(0, 0, 0), LINE_STIPPLE_NONE, STIPPLE_MASK_EMPTY);
geoMacroLayerId = geoMgr.createLayer("macros", 0, Color(200, 200, 200), Color(200, 200, 200), LINE_STIPPLE_SOLID, STIPPLE_MASK_YACIF1);
geoPortLayerId = geoMgr.createLayer("ports", 0, Color(255, 255, 255), Color(255, 255, 255), LINE_STIPPLE_NONE, STIPPLE_MASK_EMPTY);

// Pins
geoPinsLayerId = geoMgr.createLayer("pins", 5, Color(0, 0, 255), Color(0, 0, 255), LINE_STIPPLE_SOLID, STIPPLE_MASK_DOT);
Expand Down
2 changes: 1 addition & 1 deletion rsyn/src/rsyn/gui/canvas/overlay/DensityGridOverlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ void DensityGridOverlay::renderGrid(PhysicalCanvasGL * canvas) {
glBegin(GL_QUADS);

double layer = PhysicalCanvasGL::LAYER_GRID;
glColor3ub(0, 0, 0);
glColor3ub(255, 255, 255);
const unsigned numRows = grid.getNumRows();
const unsigned numCols = grid.getNumCols();

Expand Down
4 changes: 2 additions & 2 deletions rsyn/src/rsyn/gui/canvas/overlay/Layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ void LayoutOverlay::renderRows(PhysicalCanvasGL * canvas) {

glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
glBegin(GL_QUADS);
glColor3ub(0, 0, 0);
glColor3ub(255, 255, 255);
double layer = layer = PhysicalCanvasGL::LAYER_OBSTACLES;
for (Rsyn::PhysicalRow phRow : phDesign.allPhysicalRows()) {
const Bounds & bounds = phRow.getBounds();
Expand Down Expand Up @@ -683,7 +683,7 @@ void LayoutOverlay::renderBlockages(PhysicalCanvasGL * canvas) {
glColor3ub(color.r, color.g, color.b);
layer = graphicsLayer.getZ();
} else {
glColor3ub(0, 0, 0);
glColor3ub(255, 255, 255);
} // end if-else
for (Bounds bounds : phObs.allBounds()) {
bounds.translate(pos);
Expand Down
2 changes: 1 addition & 1 deletion x/src/x/gui/overlay/Jezz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void JezzOverlay::renderNodes(PhysicalCanvasGL * canvas) {
// Draw outlines.
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
glBegin(GL_QUADS);
glColor3ub(0, 0, 0);
glColor3ub(255, 255, 255);

for (Jezz::JezzNode * jezzNode : jezz->allNodes()) {
DBU xmin;
Expand Down

0 comments on commit ec008ce

Please sign in to comment.