mirror of
				https://github.com/johnwhitington/cpdf-source.git
				synced 2025-06-05 22:09:39 +02:00 
			
		
		
		
	Work on rectangle positioning
This commit is contained in:
		@@ -3106,6 +3106,12 @@ let addrectangle
 | 
			
		||||
    let x, y, _ =
 | 
			
		||||
      Cpdf.calculate_position false w mediabox Cpdf.Horizontal position
 | 
			
		||||
    in
 | 
			
		||||
    let x, y =
 | 
			
		||||
      match position with
 | 
			
		||||
        Cpdf.Top _ | Cpdf.TopLeft _ | Cpdf.TopRight _ -> (x, y -. h)
 | 
			
		||||
      | Cpdf.Centre -> (x, y -. (h /. 2.))
 | 
			
		||||
      | _ -> (x, y)
 | 
			
		||||
    in
 | 
			
		||||
    let ops =
 | 
			
		||||
      [
 | 
			
		||||
       Pdfops.Op_q;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user