Index: obj_text.h =================================================================== --- obj_text.h (revision 31226) +++ obj_text.h (revision 31227) @@ -70,6 +70,15 @@ /* creates the text object on the layer without rtree or poly clipping administration */ pcb_text_t *pcb_text_new_(pcb_layer_t *Layer, pcb_font_t *PCBFont, rnd_coord_t X, rnd_coord_t Y, double rot, int Scale, double scx, double scy, rnd_coord_t thickness, const char *TextString, pcb_flag_t Flags); +/* Create new text by bounding box: bbw and bbw are the expected bounding box + width and height, scxy is the expected text width/height ratio; place the + text by grabbing at anchor point anchx;anchy on the original bbox. The resulting + text will typically be smaller than the input bounding box, with wither + bbox width or bbox height matching the original, but text aspect ratio kept + and anchor point placed at X;Y. */ +pcb_text_t *pcb_text_new_by_bbox(pcb_layer_t *Layer, pcb_font_t *PCBFont, rnd_coord_t X, rnd_coord_t Y, rnd_coord_t bbw, rnd_coord_t bbh, rnd_coord_t anchx, rnd_coord_t anchy, double scxy, double rot, rnd_coord_t thickness, const char *TextString, pcb_flag_t Flags); + + /* Add objects without creating them or making any "sanity modifications" to them */ void pcb_add_text_on_layer(pcb_layer_t *Layer, pcb_text_t *text, pcb_font_t *PCBFont);