Remote changes at Mon Sep 4 23:20:22 EDT 2017 by chuan on vivaldi

This commit is contained in:
Chuan Chen 2017-09-04 23:20:22 -04:00
parent 1bda1206db
commit 683892981c
12 changed files with 30086 additions and 1231 deletions

View File

@ -252,6 +252,8 @@ int numstipples; /* Number of stipples */
*---------------------------------------------------------
*/
cairo_pattern_t *currentStipple;
void
grtcairoSetStipple (stipple)
int stipple; /* The stipple number to be used. */
@ -262,15 +264,17 @@ int stipple; /* The stipple number to be used. */
GR_TCAIRO_FLUSH_BATCH();
if (stipple == 0 || stipple > grNumStipples) {
//glDisable(GL_POLYGON_STIPPLE);
cairo_set_source_rgb(grCairoContext, 0, 0, 0);
//cairo_set_source_rgb(grCairoContext, 0, 0, 0);
currentStipple = cairo_pattern_create_rgba(0, 0, 0, 1);
} else {
if (stipplePatterns[stipple] == (cairo_pattern_t *)NULL) MainExit(1);
//glEnable(GL_POLYGON_STIPPLE);
//glPolygonStipple(grTCairoStipples[stipple]);
cairo_pattern_set_extend(stipplePatterns[stipple], CAIRO_EXTEND_REPEAT);
cairo_pattern_set_filter(stipplePatterns[stipple], CAIRO_FILTER_NEAREST);
cairo_set_source(grCairoContext, stipplePatterns[stipple]);
cairo_mask_surface(grCairoContext, grCairoSurface, 0.0, 0.0);
currentStipple = stipplePatterns[stipple];
//cairo_set_source(grCairoContext, stipplePatterns[stipple]);
//cairo_mask_surface(grCairoContext, grCairoSurface, 0.0, 0.0);
}
}
@ -361,6 +365,7 @@ GrTCairoInit ()
*/
cairo_set_line_width(grCairoContext, 1.0);
cairo_set_source_rgb(grCairoContext, 0, 0, 0);
currentStipple = cairo_pattern_create_rgba(0, 0, 0, 1);
/* OpenGL sets its own names for colormap and dstyle file types */
grCMapType = "OpenGL";
@ -455,27 +460,31 @@ int llx, lly, width, height;
/*
#ifdef CAIRO_INVERT_Y
//glScalef(1.0 / (float)(width >> 1), -1.0 / (float)(height >> 1), 1.0);
//cairo_scale(grCairoContext, 1.0 / (float)(width >> 1), -1.0 / (float)(height >> 1));
cairo_scale(grCairoContext, width, -height);
//cairo_scale(grCairoContext, 1, -1);
#else
//glScalef(1.0 / (float)(width >> 1), 1.0 / (float)(height >> 1), 1.0);
cairo_scale(grCairoContext, width, height);
//cairo_scale(grCairoContext, 1, 1);
#endif
*/
cairo_scale(grCairoContext, width, -height);
//cairo_translate(grCairoContext, (width >> 1), (height >> 1));
//cairo_translate(grCairoContext, width/2.0, height/2.0);
cairo_translate(grCairoContext, 0, height);
//cairo_scale(grCairoContext, width >> 1, -(height >> 1));
cairo_scale(grCairoContext, 1.0, -1.0);
//cairo_scale(grCairoContext, 1.0 / width, -1.0 / height);
/* magic origin maps to window center; move to window origin */
//glTranslated(-(GLsizei)(width >> 1), -(GLsizei)(height >> 1), 0);
cairo_translate(grCairoContext, -(int)(width >> 1), -(int)(height >> 1));
/* Remaining transformations are done on the modelview matrix */
//glMatrixMode(GL_MODELVIEW);
//glLoadIdentity();
cairo_identity_matrix(grCairoContext);
//cairo_identity_matrix(grCairoContext);
}

View File

@ -27,12 +27,15 @@ char *getenv();
//#include "grTOGLInt.h"
#include "grTCairoInt.h"
#include "textio/txcommands.h"
extern char *DBWStyleType;
//extern GLXContext grXcontext;
extern Display *grXdpy;
extern cairo_t *grCairoContext;
extern cairo_surface_t *grCairoSurface;
extern cairo_pattern_t *currentStipple;
/*---------------------------------------------------------
* GrOGLSetCMap --
@ -185,9 +188,12 @@ int nb;
cairo_rectangle(grCairoContext,
rects[i].r_ll.p_x, rects[i].r_ll.p_y,
rects[i].r_ur.p_x-rects[i].r_ll.p_x, rects[i].r_ur.p_y-rects[i].r_ll.p_y);
TxPrintf("%d %d %d %d \n", rects[i].r_ll.p_x, rects[i].r_ll.p_y, rects[i].r_ur.p_x-rects[i].r_ll.p_x, rects[i].r_ur.p_y-rects[i].r_ll.p_y);
}
// cairo_set_source_rgba(grCairoContext, r, g, b, a);
cairo_fill(grCairoContext);
cairo_clip(grCairoContext);
cairo_mask(grCairoContext, currentStipple);
//cairo_fill(grCairoContext);
}
/*---------------------------------------------------------

View File

@ -370,11 +370,11 @@ grtcairoGetBackingStore(MagWindow *w, Rect *area)
if (pmap == (Pixmap)NULL)
return FALSE;
//XGetGeometry(grXdpy, pmap, &root_return, &x_return, &y_return, &width_return, &height_return, &border_width_return, &depth_return);
XGetGeometry(grXdpy, pmap, &root_return, &x_return, &y_return, &width_return, &height_return, &border_width_return, &depth_return);
cairo_surface_t *backingStoreSurface;
// backingStoreSurface = cairo_xlib_surface_create(grXdpy, pmap, DefaultVisual(grXdpy, DefaultScreen(grXdpy)), width_return, height_return);
backingStoreSurface = cairo_xlib_surface_create(grXdpy, pmap, DefaultVisual(grXdpy, DefaultScreen(grXdpy)), width, height);
backingStoreSurface = cairo_xlib_surface_create(grXdpy, pmap, DefaultVisual(grXdpy, DefaultScreen(grXdpy)), width_return, height_return);
// backingStoreSurface = cairo_xlib_surface_create(grXdpy, pmap, DefaultVisual(grXdpy, DefaultScreen(grXdpy)), width, height);
cairo_set_source_surface(grCairoContext, backingStoreSurface, 0, 0);
cairo_rectangle(grCairoContext, xbot, ybot, width, height);
cairo_set_operator(grCairoContext, CAIRO_OPERATOR_SOURCE);
@ -480,7 +480,8 @@ grtcairoScrollBackingStore(MagWindow *w, Point *shift)
cairo_surface_t *backingStoreSurface;
backingStoreSurface = cairo_xlib_surface_create(grXdpy, pmap, DefaultVisual(grXdpy, DefaultScreen(grXdpy)), width, height);
cairo_set_source_surface(grCairoContext, backingStoreSurface, xshift, yshift);
cairo_rectangle(grCairoContext, xorigin, yorigin, width, height);
//cairo_rectangle(grCairoContext, xorigin, yorigin, width, height);
cairo_rectangle(grCairoContext, xshift, yshift, width, height);
cairo_set_operator(grCairoContext, CAIRO_OPERATOR_SOURCE);
cairo_fill(grCairoContext);
@ -554,6 +555,10 @@ grtcairoPutBackingStore(MagWindow *w, Rect *area)
cairo_rectangle(tempContext, xbot, ybot, width, height);
cairo_set_operator(tempContext, CAIRO_OPERATOR_SOURCE);
cairo_fill(tempContext);
cairo_surface_flush(backingStoreSurface);
pmap = (Pixmap) cairo_image_surface_get_data(backingStoreSurface);
cairo_surface_mark_dirty(backingStoreSurface);
}

File diff suppressed because it is too large Load Diff

248
magic/proto.magicrc Normal file
View File

@ -0,0 +1,248 @@
# 1 "proto.magicrc.in"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "<command-line>" 2
# 1 "proto.magicrc.in"
# 9 "proto.magicrc.in"
puts stdout "Processing system .magicrc file"
###############################################################################
###############################################################################
macro a "select visible"
macro A "select more visible"
macro ^A "select less visible"
macro b "box"
macro B "findbox"
macro c "copy"
macro d "delete"
macro ^D "erase $"
macro e "edit"
macro f "sideways"
macro F "upsidedown"
macro g "grid"
macro G "grid 2"
macro i "select cell"
macro I "select more cell"
macro Control_XK_i "select less cell"
imacro l "label "
macro L "shell ls"
macro ^L "redraw"
macro m "move"
macro M "stretch"
macro ^N ""
macro o "openwindow"
macro O "closewindow"
imacro p "paint "
macro Control_Shift_XK_q "quit"
macro r "clockwise"
macro R "clockwise 270"
macro ^R "clockwise 180"
macro s "select"
macro S "select more"
macro ^S "select less"
macro Control_Shift_XK_s "undo ; select"
macro u "undo"
macro U "redo"
macro v "view"
macro V "xview"
macro w "writeall"
macro W "writeall force"
macro x "expand"
macro X "unexpand"
macro ^X "expand toggle"
macro z "zoom .5"
macro Z "zoom 2"
macro ^Z "findbox zoom"
macro Control_Shift_XK_z "center"
macro ? "drc why"
macro / "select area; what ; select clear"
macro , "select clear"
macro " " "tool"
imacro XK_colon ":"
imacro XK_semicolon ":"
macro Shift_XK_space "tool box"
macro Control_XK_space "tool wiring"
macro XK_Left "scroll l .1 w"
macro Shift_XK_Left "scroll l 1 w"
macro Control_XK_Left "box grow w 1"
macro Control_Shift_XK_Left "box shrink e 1"
macro XK_Right "scroll r .1 w"
macro Shift_XK_Right "scroll r 1 w"
macro Control_XK_Right "box grow e 1"
macro Control_Shift_XK_Right "box shrink w 1"
macro XK_Up "scroll u .1 w"
macro Shift_XK_Up "scroll u 1 w"
macro Control_XK_Up "box grow n 1"
macro Control_Shift_XK_Up "box shrink s 1"
macro XK_Down "scroll d .1 w"
macro Shift_XK_Down "scroll d 1 w"
macro Control_XK_Down "box grow s 1"
macro Control_Shift_XK_Down "box shrink n 1"
macro XK_KP_Delete "box size 0 0"
macro XK_KP_Insert "box size 4 4"
macro XK_KP_0 "box size 7 2"
macro Shift_XK_KP_0 "box size 7 2"
macro XK_0 "box size 7 2"
macro Control_XK_KP_0 "box size 2 7"
macro Control_XK_KP_Insert "box size 2 7"
macro XK_KP_End "move sw 1"
macro XK_KP_Down "move d 1"
macro XK_KP_2 "stretch d 1"
macro Shift_XK_KP_2 "stretch d 1"
macro XK_2 "stretch d 1"
macro XK_KP_Next "move se 1"
macro XK_KP_Left "move l 1"
macro XK_KP_4 "stretch l 1"
macro Shift_XK_KP_4 "stretch l 1"
macro XK_4 "stretch l 1"
macro XK_KP_Begin "findbox zoom"
macro XK_KP_5 "findbox"
macro Shift_XK_KP_5 "findbox"
macro XK_5 "findbox"
macro XK_KP_Right "move r 1"
macro XK_KP_6 "stretch r 1"
macro Shift_XK_KP_6 "stretch r 1"
macro XK_6 "stretch r 1"
macro XK_KP_Home "move nw 1"
macro XK_KP_Up "move u 1"
macro XK_KP_8 "stretch u 1"
macro Shift_XK_KP_8 "stretch u 1"
macro XK_8 "stretch u 1"
macro XK_KP_Prior "move ne 1"
macro XK_Pointer_Button4 "scroll u .05 w"
macro XK_Pointer_Button5 "scroll d .05 w"
macro XK_F1 "paint ndiff"
macro XK_F2 "paint pdiff"
macro XK_F3 "paint poly"
macro XK_F4 "paint poly2"
macro XK_F5 "paint m1"
macro XK_F6 "paint m2"
macro XK_F7 "paint m3"
macro XK_F8 "paint m4"
macro XK_F9 "paint ndc"
macro XK_F10 "paint pdc"
macro XK_F11 "paint pc"
macro XK_F12 "paint via"
# 235 "proto.magicrc.in"
macro Control_Button1 "*bypass box move bl cursor"
macro Control_Button2 "*bypass paint cursor"
macro Control_Button3 "*bypass box corner ur cursor"
macro Button1 "*bypass box move bl cursor"
macro Shift_Button1 "*bypass box corner bl cursor"
macro Button2 "*bypass paint cursor"
macro Shift_Button2 "*bypass erase cursor"
macro Button3 "*bypass box corner ur cursor"
macro Shift_Button3 "*bypass box move ur cursor"
# 258 "proto.magicrc.in"
macro color Button1 "pushbutton left"
macro color Button2 "pushbutton middle"
macro color Button3 "pushbutton right"
macro color u "undo"
macro color U "redo"
macro color plus "color next"
macro color minus "color last"
macro netlist Button1 "pushbutton left"
macro netlist Button2 "pushbutton middle"
macro netlist Button3 "pushbutton right"
macro wind3d L "level up"
macro wind3d l "level down"
macro wind3d C "cif"
macro wind3d " " "defaults"
macro wind3d ^L "refresh"
macro wind3d Z "zoom 2.0 1 rel"
macro wind3d z "zoom 0.5 1 rel"
macro wind3d 1 "view 0 10 0 rel"
macro wind3d 2 "view 0 -10 0 rel"
macro wind3d 3 "view 10 0 0 rel"
macro wind3d 4 "view -10 0 0 rel"
macro wind3d 5 "view 0 0 10 rel"
macro wind3d 6 "view 0 0 -10 rel"
macro wind3d 7 "view 0 1 0 rel"
macro wind3d 8 "view 0 -1 0 rel"
macro wind3d 9 "view 1 0 0 rel"
macro wind3d 0 "view -1 0 0 rel"
macro wind3d XK_Up "scroll 0 -0.25 0 rel"
macro wind3d XK_Down "scroll 0 0.25 0 rel"
macro wind3d XK_Left "scroll 0.25 0 0 rel"
macro wind3d XK_Right "scroll -0.25 0 0 rel"
macro wind3d XK_minus "view 0 0 1 rel"
macro wind3d XK_equal "view 0 0 -1 rel"
macro wind3d XK_greater "zoom 1 2.0 rel"
macro wind3d XK_less "zoom 1 0.5 rel"
setlabel font FreeSans.pt3 0.58
setlabel font FreeSerif.pt3 0.58
setlabel font FreeMono.pt3 0.6
magic::suspendout
if {![catch {set Opts(tools)}]} { magic::enable_tools }
set GND "gnd!"
set VDD "vdd!"
magic::resumeout
catch {source ${CAD_ROOT}/magic/sys/site.def}

6806
make.log

File diff suppressed because it is too large Load Diff

59
scmos/gdsquery.tech Normal file
View File

@ -0,0 +1,59 @@
tech
format 28
gdsquery
end
version
version 0.1
description "Minimal technology file for querying an unknown GDS database"
end
planes
end
types
end
contact
end
styles
styletype mos
end
compose
end
connect
end
cifoutput
style generic
scalefactor 1
end
cifinput
style generic
scalefactor 1
end
# mzrouter
# end
drc
end
extract
end
# wiring
# end
# router
# end
# plowing
# end
# plot
# end

View File

@ -0,0 +1,55 @@
tech
format 28
minimum
end
version
version 0.0
description "Minimum technology file structure"
end
planes
end
types
end
contact
end
styles
styletype mos
end
compose
end
connect
end
cifoutput
end
cifinput
end
# mzrouter
# end
drc
end
extract
end
# wiring
# end
# router
# end
# plowing
# end
# plot
# end

3332
scmos/scmos-sub.tech Normal file

File diff suppressed because it is too large Load Diff

4410
scmos/scmos-tm.tech Normal file

File diff suppressed because it is too large Load Diff

6391
scmos/scmos.tech Normal file

File diff suppressed because it is too large Load Diff

6380
scmos/scmosWR.tech Normal file

File diff suppressed because it is too large Load Diff