;File : cross_ruler.il
;Author : zoujunlin
;Date : 2017/05/22
;Description : create crisscross ruler at the cursor point
;step 1 : get cursor point
;step 2 : get bBox of cell view
;step 3 : create rulers
procedure(cross_ruler()
let((cv cv_bbox point)
cv = geGetEditCellView()
;step 1 : get cursor point
; point = hiGetDbuPoint(hiGetCurrentWindow())
; x = car(pointDb)/2000 ;dbu per unit maybe 1000 or 2000 according to the techfile definition
; y = cadr(pointDb)/2000 ;dbu per unit maybe 1000 or 2000 according to the techfile definition
point = hiGetPoint(hiGetCurrentWindow());
x = car(point)
y = cadr(point)
;step 2 : get bBox of cell view
cv_bbox = cv->bBox
lowerleft = car(cv_bbox)
rightupper = cadr(cv_bbox)
left = car(lowerleft)
right = car(rightupper)
bottom = cadr(lowerleft)
top = cadr(rightupper)
;step 3 : create rulers
leCreateRuler(cv list(x:y left:y))
leCreateRuler(cv list(x:y right:y))
leCreateRuler(cv list(x:y x:top))
leCreateRuler(cv list(x:y x:bottom))
);end let
);end procedure
hiSetBindKey("Layout" "v" "cross_ruler()")