         let lineBase = textView.textContainerOrigin.scaled(to: scale).y + drawingInfo.ascent
         switch textView.layoutOrientation {
         case .horizontal:
-            context.translateBy(x: self.thickness, y: relativePoint.y + lineBase)
+            context.translateBy(x: self.thickness, y: relativePoint.y - lineBase)
         case .vertical:
-            context.translateBy(x: round(relativePoint.x - lineBase), y: self.thickness)
-        }
-        context.scaleBy(x: 1, y: -1)  // flip
+            context.translateBy(x: round(relativePoint.x - lineBase), y: 0)
+        }
         
         // draw labels
         textView.enumerateLineFragments(in: textView.visibleRect) { (line, lineRect) in

            NSBezierPath.strokeLine(from: NSPoint(x: self.bounds.maxX - 0.5, y: dirtyRect.maxY),
                                    to: NSPoint(x: self.bounds.maxX - 0.5, y: dirtyRect.minY))
        case .vertical:
            NSBezierPath.strokeLine(from: NSPoint(x: dirtyRect.minX, y: self.bounds.maxY - 0.5),
                                    to: NSPoint(x: dirtyRect.maxX, y: self.bounds.maxY - 0.5))
        }
        
        NSGraphicsContext.restoreGraphicsState()

    }
    
    
    /// make background transparent
    override var isOpaque: Bool {
        
