+ state->pixel_size = get_integer_resource(state->dpy, "pixel-size", "Integer");
+ if (state->pixel_size < 1) state->pixel_size = 1;
+ if (state->pixel_size > state->xlim) state->pixel_size = state->xlim;
+
+ state->number_of_cells = state->xlim / state->pixel_size;
+
+ /*
+ * The minimum number of generations is 2 since we must allocate enough
+ * space to hold the seed generation and at least one pass through
+ * WolframAutomata_draw(), which is where we check whether or not we've
+ * reached the end of the pixmap.
+ */
+ state->num_generations = get_integer_resource(state->dpy, "num-generations", "Integer");
+ if (state->num_generations < 0) state->num_generations = 2;
+